diff options
author | John Stultz <john.stultz@linaro.org> | 2012-03-23 23:52:25 +0100 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2012-03-24 00:23:12 +0100 |
commit | ad30dfa94c5cc23931c822922a50bd163ab293a5 (patch) | |
tree | 574daa8c88b38161fe6139ba2b3fcda42538f32d /kernel | |
parent | ntp: Fix leap-second hrtimer livelock (diff) | |
download | linux-ad30dfa94c5cc23931c822922a50bd163ab293a5.tar.xz linux-ad30dfa94c5cc23931c822922a50bd163ab293a5.zip |
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')
-rw-r--r-- | kernel/time/alarmtimer.c | 5 |
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 { static ktime_t freezer_delta; static DEFINE_SPINLOCK(freezer_delta_lock); +static struct rtc_timer rtctimer; + #ifdef CONFIG_RTC_CLASS /* rtc timer and device for setting alarm wakeups at suspend */ -static struct rtc_timer rtctimer; static struct rtc_device *rtcdev; static DEFINE_SPINLOCK(rtcdev_lock); @@ -783,6 +784,8 @@ static int __init alarmtimer_init(void) .nsleep = alarm_timer_nsleep, }; + rtc_timer_init(&rtctimer, NULL, NULL); + posix_timers_register_clock(CLOCK_REALTIME_ALARM, &alarm_clock); posix_timers_register_clock(CLOCK_BOOTTIME_ALARM, &alarm_clock); |