diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-14 06:06:36 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-14 06:06:36 -0400 |
commit | a18f22a968de17b29f2310cdb7ba69163e65ec15 (patch) | |
tree | a7d56d88fad5e444d7661484109758a2f436129e /drivers/rtc/class.c | |
parent | a1c57e0fec53defe745e64417eacdbd3618c3e66 (diff) | |
parent | 798778b8653f64b7b2162ac70eca10367cff6ce8 (diff) |
Merge branch 'consolidate-clksrc-i8253' of master.kernel.org:~rmk/linux-2.6-arm into timers/clocksource
Conflicts:
arch/ia64/kernel/cyclone.c
arch/mips/kernel/i8253.c
arch/x86/kernel/i8253.c
Reason: Resolve conflicts so further cleanups do not conflict further
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/rtc/class.c')
-rw-r--r-- | drivers/rtc/class.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index c404b61386bf..39013867cbd6 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c | |||
@@ -117,6 +117,7 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev, | |||
117 | struct module *owner) | 117 | struct module *owner) |
118 | { | 118 | { |
119 | struct rtc_device *rtc; | 119 | struct rtc_device *rtc; |
120 | struct rtc_wkalrm alrm; | ||
120 | int id, err; | 121 | int id, err; |
121 | 122 | ||
122 | if (idr_pre_get(&rtc_idr, GFP_KERNEL) == 0) { | 123 | if (idr_pre_get(&rtc_idr, GFP_KERNEL) == 0) { |
@@ -166,6 +167,12 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev, | |||
166 | rtc->pie_timer.function = rtc_pie_update_irq; | 167 | rtc->pie_timer.function = rtc_pie_update_irq; |
167 | rtc->pie_enabled = 0; | 168 | rtc->pie_enabled = 0; |
168 | 169 | ||
170 | /* Check to see if there is an ALARM already set in hw */ | ||
171 | err = __rtc_read_alarm(rtc, &alrm); | ||
172 | |||
173 | if (!err && !rtc_valid_tm(&alrm.time)) | ||
174 | rtc_initialize_alarm(rtc, &alrm); | ||
175 | |||
169 | strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE); | 176 | strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE); |
170 | dev_set_name(&rtc->dev, "rtc%d", id); | 177 | dev_set_name(&rtc->dev, "rtc%d", id); |
171 | 178 | ||