aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/class.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-11 14:06:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-11 14:06:41 -0500
commit5943a268002fce97885f2ca08827ff1b0312068c (patch)
tree5e304e79b68263e799224ebb1a08ead474ab299b /drivers/rtc/class.c
parent42776163e13a56ea3096edff7a5df95408e80eb4 (diff)
parent96c8f06a0fb359a9a89701a7afab6d837e466ab0 (diff)
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: rtc: Namespace fixup RTC: Remove UIE emulation RTC: Rework RTC code to use timerqueue for events Fix up trivial conflict in drivers/rtc/rtc-dev.c
Diffstat (limited to 'drivers/rtc/class.c')
-rw-r--r--drivers/rtc/class.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index e6539cbabb35..9583cbcc6b79 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -16,6 +16,7 @@
16#include <linux/kdev_t.h> 16#include <linux/kdev_t.h>
17#include <linux/idr.h> 17#include <linux/idr.h>
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <linux/workqueue.h>
19 20
20#include "rtc-core.h" 21#include "rtc-core.h"
21 22
@@ -152,6 +153,18 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev,
152 spin_lock_init(&rtc->irq_task_lock); 153 spin_lock_init(&rtc->irq_task_lock);
153 init_waitqueue_head(&rtc->irq_queue); 154 init_waitqueue_head(&rtc->irq_queue);
154 155
156 /* Init timerqueue */
157 timerqueue_init_head(&rtc->timerqueue);
158 INIT_WORK(&rtc->irqwork, rtc_timer_do_work);
159 /* Init aie timer */
160 rtc_timer_init(&rtc->aie_timer, rtc_aie_update_irq, (void *)rtc);
161 /* Init uie timer */
162 rtc_timer_init(&rtc->uie_rtctimer, rtc_uie_update_irq, (void *)rtc);
163 /* Init pie timer */
164 hrtimer_init(&rtc->pie_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
165 rtc->pie_timer.function = rtc_pie_update_irq;
166 rtc->pie_enabled = 0;
167
155 strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE); 168 strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE);
156 dev_set_name(&rtc->dev, "rtc%d", id); 169 dev_set_name(&rtc->dev, "rtc%d", id);
157 170