]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-cmos.c
rtc: Allow RTC_DRV_CMOS to be used on SPARC.
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-cmos.c
index 6ea349aba3ba1fa81f159bcbb18235073cf80164..04ecfd2e7c880a1215ca040161860b567aaabdf8 100644 (file)
@@ -636,7 +636,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
         */
 #if    defined(CONFIG_ATARI)
        address_space = 64;
-#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__)
+#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__sparc__)
        address_space = 128;
 #else
 #warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes.
@@ -699,7 +699,8 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
        /* FIXME teach the alarm code how to handle binary mode;
         * <asm-generic/rtc.h> doesn't know 12-hour mode either.
         */
-       if (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY))) {
+       if (is_valid_irq(rtc_irq) &&
+           (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY)))) {
                dev_dbg(dev, "only 24-hr BCD mode supported\n");
                retval = -ENXIO;
                goto cleanup1;