aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2012-03-23 18:52:25 -0400
committerJohn Stultz <john.stultz@linaro.org>2012-03-23 19:23:12 -0400
commitad30dfa94c5cc23931c822922a50bd163ab293a5 (patch)
tree574daa8c88b38161fe6139ba2b3fcda42538f32d /kernel/time
parent6b43ae8a619d17c4935c3320d2ef9e92bdeed05d (diff)
alarmtimer: Make sure we initialize the rtctimer
jonghwan Choi reported seeing warnings with the alarmtimer code at suspend/resume time, and pointed out that the rtctimer isn't being properly initialized. This patch corrects this issue. Reported-by: jonghwan Choi <jhbird.choi@gmail.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/alarmtimer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index 8a46f5d64504..c16548807f1e 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -46,9 +46,10 @@ static struct alarm_base {
46static ktime_t freezer_delta; 46static ktime_t freezer_delta;
47static DEFINE_SPINLOCK(freezer_delta_lock); 47static DEFINE_SPINLOCK(freezer_delta_lock);
48 48
49static struct rtc_timer rtctimer;
50
49#ifdef CONFIG_RTC_CLASS 51#ifdef CONFIG_RTC_CLASS
50/* rtc timer and device for setting alarm wakeups at suspend */ 52/* rtc timer and device for setting alarm wakeups at suspend */
51static struct rtc_timer rtctimer;
52static struct rtc_device *rtcdev; 53static struct rtc_device *rtcdev;
53static DEFINE_SPINLOCK(rtcdev_lock); 54static DEFINE_SPINLOCK(rtcdev_lock);
54 55
@@ -783,6 +784,8 @@ static int __init alarmtimer_init(void)
783 .nsleep = alarm_timer_nsleep, 784 .nsleep = alarm_timer_nsleep,
784 }; 785 };
785 786
787 rtc_timer_init(&rtctimer, NULL, NULL);
788
786 posix_timers_register_clock(CLOCK_REALTIME_ALARM, &alarm_clock); 789 posix_timers_register_clock(CLOCK_REALTIME_ALARM, &alarm_clock);
787 posix_timers_register_clock(CLOCK_BOOTTIME_ALARM, &alarm_clock); 790 posix_timers_register_clock(CLOCK_BOOTTIME_ALARM, &alarm_clock);
788 791