diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-11 20:06:41 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-11 20:06:41 +0100 |
commit | 5943a268002fce97885f2ca08827ff1b0312068c (patch) | |
tree | 5e304e79b68263e799224ebb1a08ead474ab299b /drivers/rtc/class.c | |
parent | Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
parent | rtc: Namespace fixup (diff) | |
download | linux-5943a268002fce97885f2ca08827ff1b0312068c.tar.xz linux-5943a268002fce97885f2ca08827ff1b0312068c.zip |
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.c | 13 |
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 @@ #include <linux/kdev_t.h> #include <linux/idr.h> #include <linux/slab.h> +#include <linux/workqueue.h> #include "rtc-core.h" @@ -152,6 +153,18 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev, spin_lock_init(&rtc->irq_task_lock); init_waitqueue_head(&rtc->irq_queue); + /* Init timerqueue */ + timerqueue_init_head(&rtc->timerqueue); + INIT_WORK(&rtc->irqwork, rtc_timer_do_work); + /* Init aie timer */ + rtc_timer_init(&rtc->aie_timer, rtc_aie_update_irq, (void *)rtc); + /* Init uie timer */ + rtc_timer_init(&rtc->uie_rtctimer, rtc_uie_update_irq, (void *)rtc); + /* Init pie timer */ + hrtimer_init(&rtc->pie_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); + rtc->pie_timer.function = rtc_pie_update_irq; + rtc->pie_enabled = 0; + strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE); dev_set_name(&rtc->dev, "rtc%d", id); |