From patchwork Thu Feb 9 22:24:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 6740 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id F22DA23E01 for ; Thu, 9 Feb 2012 22:25:48 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id BB06FA18167 for ; Thu, 9 Feb 2012 22:25:48 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id z7so4255939iab.11 for ; Thu, 09 Feb 2012 14:25:48 -0800 (PST) Received: by 10.42.57.148 with SMTP id d20mr5473544ich.33.1328826348529; Thu, 09 Feb 2012 14:25:48 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.12.131 with SMTP id x3cs56341ibx; Thu, 9 Feb 2012 14:25:48 -0800 (PST) Received: by 10.68.237.106 with SMTP id vb10mr10150453pbc.4.1328826346955; Thu, 09 Feb 2012 14:25:46 -0800 (PST) Received: from e37.co.us.ibm.com (e37.co.us.ibm.com. [32.97.110.158]) by mx.google.com with ESMTPS id s4si5941106pbc.222.2012.02.09.14.25.46 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Feb 2012 14:25:46 -0800 (PST) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.158 as permitted sender) client-ip=32.97.110.158; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.158 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Feb 2012 15:25:45 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 9 Feb 2012 15:24:56 -0700 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 73B9519D8058; Thu, 9 Feb 2012 15:24:52 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q19MOniE061404; Thu, 9 Feb 2012 15:24:51 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q19MOmQt001403; Thu, 9 Feb 2012 15:24:48 -0700 Received: from kernel.beaverton.ibm.com (kernel.beaverton.ibm.com [9.47.67.96]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q19MOmL2001379; Thu, 9 Feb 2012 15:24:48 -0700 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id E46EDBFEC1; Thu, 9 Feb 2012 14:24:47 -0800 (PST) From: John Stultz To: Greg KH Cc: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Greg KH , Android Kernel Team , John Stultz Subject: [PATCH 02/12] android-alarm: Don't use save_time_delta. Date: Thu, 9 Feb 2012 14:24:31 -0800 Message-Id: <1328826281-27148-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1328826281-27148-1-git-send-email-john.stultz@linaro.org> References: <1328826281-27148-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12020922-7408-0000-0000-000002898EFE X-Gm-Message-State: ALoCoQkzSQei0VlBZBcAbKgUuBZwWh4Ha59SkZRS20c0cpSkAJYSuJKHdiF5OaXupGWwH4V9QgVu From: Arve Hjønnevåg Remove references to non-existant save_time_delta. Change-Id: Iaefeca497de02fe36b7f5d79075912f6e349ec53 CC: Arve Hjønnevåg CC: Greg KH CC: Android Kernel Team Signed-off-by: Arve Hjønnevåg [Added commit message -jstultz] Signed-off-by: John Stultz --- drivers/staging/android/alarm.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/staging/android/alarm.c b/drivers/staging/android/alarm.c index c5bd51f..bc59ac4 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)),