diff options
author | Krzysztof Halasa <khc@pm.waw.pl> | 2009-04-21 15:24:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-21 16:41:50 -0400 |
commit | 6d029b645175ae71fdeedea84b246ecb1362d003 (patch) | |
tree | 837f6d63186d27eafb8f3b9d91aef6aca863dd44 | |
parent | 6e538aaf50ae782a890cbc02c27950448d8193e1 (diff) |
rtc-cmos: fix printk output
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>
-rw-r--r-- | drivers/rtc/rtc-cmos.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index b6d35f50e404..23e10b6263d6 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
@@ -797,17 +797,15 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) | |||
797 | goto cleanup2; | 797 | goto cleanup2; |
798 | } | 798 | } |
799 | 799 | ||
800 | pr_info("%s: alarms up to one %s%s, %zd bytes nvram%s\n", | 800 | pr_info("%s: %s%s, %zd bytes nvram%s\n", |
801 | dev_name(&cmos_rtc.rtc->dev), | 801 | dev_name(&cmos_rtc.rtc->dev), |
802 | is_valid_irq(rtc_irq) | 802 | !is_valid_irq(rtc_irq) ? "no alarms" : |
803 | ? (cmos_rtc.mon_alrm | 803 | cmos_rtc.mon_alrm ? "alarms up to one year" : |
804 | ? "year" | 804 | cmos_rtc.day_alrm ? "alarms up to one month" : |
805 | : (cmos_rtc.day_alrm | 805 | "alarms up to one day", |
806 | ? "month" : "day")) | 806 | cmos_rtc.century ? ", y3k" : "", |
807 | : "no", | 807 | nvram.size, |
808 | cmos_rtc.century ? ", y3k" : "", | 808 | is_hpet_enabled() ? ", hpet irqs" : ""); |
809 | nvram.size, | ||
810 | is_hpet_enabled() ? ", hpet irqs" : ""); | ||
811 | 809 | ||
812 | return 0; | 810 | return 0; |
813 | 811 | ||