alarmtimer: Make sure we initialize the rtctimer
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 38 lines · tip-bot for John Stultz
Commit-ID: ad30dfa94c5cc23931c822922a50bd163ab293a5 Gitweb: http://git.kernel.org/tip/ad30dfa94c5cc23931c822922a50bd163ab293a5 Author: John Stultz <[email protected]> AuthorDate: Fri, 23 Mar 2012 15:52:25 -0700 Committer: John Stultz <[email protected]> CommitDate: Fri, 23 Mar 2012 16:23:12 -0700alarmtimer: 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 <[email protected]>Signed-off-by John Stultz <[email protected]>--- kernel/time/alarmtimer.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)kernel/time/alarmtimer.c +2
-1@@ -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);
kernel/time/alarmtimer.c static int __init alarmtimer_init(void) · line 790
Quoted 7 lines
kernel/time/alarmtimer.c +2
-0@@ -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);
This commit breaks every build that has CONFIG_RTC_LIB disabled:
alarmtimer.c:(.init.text+0x1cc7): undefined reference to `rtc_timer_init'
Thanks,
Ingo