rtc-cmos: fix printk output
authorKrzysztof Halasa <khc@pm.waw.pl>
Tue, 21 Apr 2009 19:24:49 +0000 (12:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Apr 2009 20:41:50 +0000 (13:41 -0700)
With no IRQ available/defined, RTC-CMOS driver prints something like:
rtc0: alarms up to one no, y3k, 114 bytes nvram
                              ^^^^
I guess the following is a bit easier to understand:
rtc0: no alarms, y3k, 114 bytes nvram

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-cmos.c

index b6d35f5..23e10b6 100644 (file)
@@ -797,17 +797,15 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
                goto cleanup2;
        }
 
-       pr_info("%s: alarms up to one %s%s, %zd bytes nvram%s\n",
-                       dev_name(&cmos_rtc.rtc->dev),
-                       is_valid_irq(rtc_irq)
-                               ?  (cmos_rtc.mon_alrm
-                                       ? "year"
-                                       : (cmos_rtc.day_alrm
-                                               ? "month" : "day"))
-                               : "no",
-                       cmos_rtc.century ? ", y3k" : "",
-                       nvram.size,
-                       is_hpet_enabled() ? ", hpet irqs" : "");
+       pr_info("%s: %s%s, %zd bytes nvram%s\n",
+               dev_name(&cmos_rtc.rtc->dev),
+               !is_valid_irq(rtc_irq) ? "no alarms" :
+                       cmos_rtc.mon_alrm ? "alarms up to one year" :
+                       cmos_rtc.day_alrm ? "alarms up to one month" :
+                       "alarms up to one day",
+               cmos_rtc.century ? ", y3k" : "",
+               nvram.size,
+               is_hpet_enabled() ? ", hpet irqs" : "");
 
        return 0;