diff options
author | Arve Hjønnevåg <arve@android.com> | 2010-03-12 20:05:32 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-06-14 09:09:29 -0700 |
commit | b2a4ab2aa07da53d7f05f880b763e40e60c7d122 (patch) | |
tree | 11406d1b6dad8be5a346f98d7d2c49cb3f8aa041 /drivers/rtc | |
parent | 76cca8597f82a2c08ae93f9c2f54bc0729d01b2e (diff) | |
download | kernel_samsung_aries-b2a4ab2aa07da53d7f05f880b763e40e60c7d122.zip kernel_samsung_aries-b2a4ab2aa07da53d7f05f880b763e40e60c7d122.tar.gz kernel_samsung_aries-b2a4ab2aa07da53d7f05f880b763e40e60c7d122.tar.bz2 |
rtc: alarm: Don't use save_time_delta.
Change-Id: Iaefeca497de02fe36b7f5d79075912f6e349ec53
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/alarm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/rtc/alarm.c b/drivers/rtc/alarm.c index 18492fd..084ef64 100644 --- a/drivers/rtc/alarm.c +++ b/drivers/rtc/alarm.c @@ -373,8 +373,8 @@ static int alarm_suspend(struct platform_device *pdev, pm_message_t state) struct rtc_time rtc_current_rtc_time; unsigned long rtc_current_time; unsigned long rtc_alarm_time; - struct timespec rtc_current_timespec; struct timespec rtc_delta; + struct timespec wall_time; struct alarm_queue *wakeup_queue = NULL; struct alarm_queue *tmp_queue = NULL; @@ -398,10 +398,11 @@ static int alarm_suspend(struct platform_device *pdev, pm_message_t state) wakeup_queue = tmp_queue; if (wakeup_queue) { rtc_read_time(alarm_rtc_dev, &rtc_current_rtc_time); - rtc_current_timespec.tv_nsec = 0; - rtc_tm_to_time(&rtc_current_rtc_time, - &rtc_current_timespec.tv_sec); - save_time_delta(&rtc_delta, &rtc_current_timespec); + getnstimeofday(&wall_time); + rtc_tm_to_time(&rtc_current_rtc_time, &rtc_current_time); + set_normalized_timespec(&rtc_delta, + wall_time.tv_sec - rtc_current_time, + wall_time.tv_nsec); rtc_alarm_time = timespec_sub(ktime_to_timespec( hrtimer_get_expires(&wakeup_queue->timer)), |