diff options
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 565562ba6ac9..95d2b82762d6 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, rtctimer_do_work); | ||
159 | /* Init aie timer */ | ||
160 | rtctimer_init(&rtc->aie_timer, rtc_aie_update_irq, (void *)rtc); | ||
161 | /* Init uie timer */ | ||
162 | rtctimer_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 | ||