]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[SPARC64]: arch/sparc64/time.c doesn't compile on Ultra 1 (no PCI)
authorHorst H. von Brand <vonbrand@inf.utfsm.cl>
Sun, 27 May 2007 00:47:53 +0000 (17:47 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 29 May 2007 09:50:02 +0000 (02:50 -0700)
This is bug 8540 on bugzilla.kernel.org

arch/sparc64/time.c contains references to assorted bq4802 stuff if
CONFIG_PCI is not set, and compile fails. I #ifdef'ed out everything
that looks PCI-ish in that file.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/time.c

index 0f62ea82953cb23aa595ee70b5149fb1961fbe2d..f2e73e61374818a0a081b43062f31423e0d12c66 100644 (file)
@@ -1362,6 +1362,7 @@ static int hypervisor_set_rtc_time(struct rtc_time *time)
        return hypervisor_set_time(seconds);
 }
 
+#ifdef CONFIG_PCI
 static void bq4802_get_rtc_time(struct rtc_time *time)
 {
        unsigned char val = readb(bq4802_regs + 0x0e);
@@ -1433,6 +1434,7 @@ static int bq4802_set_rtc_time(struct rtc_time *time)
 
        return 0;
 }
+#endif /* CONFIG_PCI */
 
 struct mini_rtc_ops {
        void (*get_rtc_time)(struct rtc_time *);
@@ -1449,10 +1451,12 @@ static struct mini_rtc_ops hypervisor_rtc_ops = {
        .set_rtc_time = hypervisor_set_rtc_time,
 };
 
+#ifdef CONFIG_PCI
 static struct mini_rtc_ops bq4802_rtc_ops = {
        .get_rtc_time = bq4802_get_rtc_time,
        .set_rtc_time = bq4802_set_rtc_time,
 };
+#endif /* CONFIG_PCI */
 
 static struct mini_rtc_ops *mini_rtc_ops;
 
@@ -1576,8 +1580,10 @@ static int __init rtc_mini_init(void)
                mini_rtc_ops = &hypervisor_rtc_ops;
        else if (this_is_starfire)
                mini_rtc_ops = &starfire_rtc_ops;
+#ifdef CONFIG_PCI
        else if (bq4802_regs)
                mini_rtc_ops = &bq4802_rtc_ops;
+#endif /* CONFIG_PCI */
        else
                return -ENODEV;