Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297394
b: refs/heads/master
c: c5e14e7
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Mar 24, 2012
1 parent 09073ed commit d33cecc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: 68fe7b23d559763a2e19e5fc1cf7036e4aaecb10
refs/heads/master: c5e14e763046b11dd8bf57b5dc9f3ab444af8e60
11 changes: 8 additions & 3 deletions trunk/kernel/time/alarmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ 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);

Expand Down Expand Up @@ -97,6 +96,11 @@ static int alarmtimer_rtc_add_device(struct device *dev,
return 0;
}

static inline void alarmtimer_rtc_timer_init(void)
{
rtc_timer_init(&rtctimer, NULL, NULL);
}

static struct class_interface alarmtimer_rtc_interface = {
.add_dev = &alarmtimer_rtc_add_device,
};
Expand All @@ -118,6 +122,7 @@ static inline struct rtc_device *alarmtimer_get_rtcdev(void)
#define rtcdev (NULL)
static inline int alarmtimer_rtc_interface_setup(void) { return 0; }
static inline void alarmtimer_rtc_interface_remove(void) { }
static inline void alarmtimer_rtc_timer_init(void) { }
#endif

/**
Expand Down Expand Up @@ -784,7 +789,7 @@ static int __init alarmtimer_init(void)
.nsleep = alarm_timer_nsleep,
};

rtc_timer_init(&rtctimer, NULL, NULL);
alarmtimer_rtc_timer_init();

posix_timers_register_clock(CLOCK_REALTIME_ALARM, &alarm_clock);
posix_timers_register_clock(CLOCK_BOOTTIME_ALARM, &alarm_clock);
Expand Down

0 comments on commit d33cecc

Please sign in to comment.