aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2012-02-09 14:24:31 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-10 10:06:18 -0800
commit5dd12c29b45f27d059e4bd58ff1854bc6a236804 (patch)
treefb91a42a9725892aa82a8c568c76a18f8d2750c9 /drivers/staging
parent841cb11c6fc7ae559ef2d856932907056b75617d (diff)
staging: android-alarm: Don't use save_time_delta.
Remove references to non-existant save_time_delta. Change-Id: Iaefeca497de02fe36b7f5d79075912f6e349ec53 CC: Arve Hjønnevåg <arve@android.com> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Arve Hjønnevåg <arve@android.com> [Added commit message -jstultz] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/android/alarm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/android/alarm.c b/drivers/staging/android/alarm.c
index c5bd51fd839..bc59ac405b2 100644
--- a/drivers/staging/android/alarm.c
+++ b/drivers/staging/android/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)),