Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245637
b: refs/heads/master
c: 472647d
h: refs/heads/master
i:
  245635: 072ae22
v: v3
  • Loading branch information
John Stultz authored and Thomas Gleixner committed May 2, 2011
1 parent ce2cebb commit d6d8794
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7068b7a16270f1e85a8893d74b0f3c58d7826883
refs/heads/master: 472647dcd7e351dbeda750e5ab3e8f7b06d1199a
20 changes: 18 additions & 2 deletions trunk/kernel/time/alarmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ static struct alarm_base {
clockid_t base_clockid;
} alarm_bases[ALARM_NUMTYPE];

#ifdef CONFIG_RTC_CLASS
/* rtc timer and device for setting alarm wakeups at suspend */
static struct rtc_timer rtctimer;
static struct rtc_device *rtcdev;
#endif

/* freezer delta & lock used to handle clock_nanosleep triggered wakeups */
static ktime_t freezer_delta;
Expand Down Expand Up @@ -148,7 +150,7 @@ static enum hrtimer_restart alarmtimer_fired(struct hrtimer *timer)

}


#ifdef CONFIG_RTC_CLASS
/**
* alarmtimer_suspend - Suspend time callback
* @dev: unused
Expand Down Expand Up @@ -206,7 +208,12 @@ static int alarmtimer_suspend(struct device *dev)

return 0;
}

#else
static int alarmtimer_suspend(struct device *dev)
{
return 0;
}
#endif

static void alarmtimer_freezerset(ktime_t absexp, enum alarmtimer_type type)
{
Expand Down Expand Up @@ -631,6 +638,7 @@ static int __init alarmtimer_init(void)
}
device_initcall(alarmtimer_init);

#ifdef CONFIG_RTC_CLASS
/**
* has_wakealarm - check rtc device has wakealarm ability
* @dev: current device
Expand Down Expand Up @@ -675,4 +683,12 @@ static int __init alarmtimer_init_late(void)

return 0;
}
#else
static int __init alarmtimer_init_late(void)
{
printk(KERN_WARNING "Kernel not built with RTC support, ALARM timers"
" will not wake from suspend");
return 0;
}
#endif
late_initcall(alarmtimer_init_late);

0 comments on commit d6d8794

Please sign in to comment.