From patchwork Sun Feb 15 13:09:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xunlei Pang X-Patchwork-Id: 44685 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8099A21533 for ; Sun, 15 Feb 2015 13:12:40 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf12696094wib.2 for ; Sun, 15 Feb 2015 05:12:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=/R+UEMCgB8OOoCcQc7f0A4kA82T76+6JLgDRNUhnM0M=; b=ZEewrzwuqNmhXiptsJ6H92NRpdopdwQypDn3JRfJnjI/cofmwV2SCiV5m/O2qzhyAa 9mkf4iCRF+VTC+F/2tvxLqusaONyEp34lrYlKoXWcNhRXNEpai/hCSA2aIJ6pwZ2P/Al xuA2Axx5cAGT46W9TNKgpHCTWCzaxlsWcvs/srZ6/sVp+M9C7g11MplgPqq2UwB22vqR Jg1Xy9tuYXt4RISQH9fUoGRF99MpzonbAF3NE6tQFJ5CJmrbUjQ4scNNdXQ/vZjMOcy4 gJFyP+Y+qIQlJRiJPq+I6JKnEBdHk4D68kjDECGGsU/fx/J5wIzbUC3ilndC8f0u06Bo wBSA== X-Gm-Message-State: ALoCoQklwSFJcXX7RLh4vgokWvtPCZOVNguT8qIsB4aWgtj2UO6qqPwWc9/wx3ZkKH5jNY0y2Pbe X-Received: by 10.194.86.1 with SMTP id l1mr2351564wjz.0.1424005959806; Sun, 15 Feb 2015 05:12:39 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.7 with SMTP id f7ls440417lah.84.gmail; Sun, 15 Feb 2015 05:12:39 -0800 (PST) X-Received: by 10.112.137.38 with SMTP id qf6mr17330768lbb.59.1424005959377; Sun, 15 Feb 2015 05:12:39 -0800 (PST) Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com. [2a00:1450:4010:c04::236]) by mx.google.com with ESMTPS id zm9si4747743lbb.156.2015.02.15.05.12.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Feb 2015 05:12:39 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::236 as permitted sender) client-ip=2a00:1450:4010:c04::236; Received: by mail-lb0-f182.google.com with SMTP id f15so21966381lbj.13 for ; Sun, 15 Feb 2015 05:12:39 -0800 (PST) X-Received: by 10.112.114.230 with SMTP id jj6mr16974421lbb.112.1424005959246; Sun, 15 Feb 2015 05:12:39 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1038607lbj; Sun, 15 Feb 2015 05:12:38 -0800 (PST) X-Received: by 10.66.63.2 with SMTP id c2mr30915849pas.23.1424005957491; Sun, 15 Feb 2015 05:12:37 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ir4si7178655pbb.212.2015.02.15.05.12.36; Sun, 15 Feb 2015 05:12:37 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754885AbbBONML (ORCPT + 28 others); Sun, 15 Feb 2015 08:12:11 -0500 Received: from m50-110.126.com ([123.125.50.110]:48895 "EHLO m50-110.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754753AbbBONMJ (ORCPT ); Sun, 15 Feb 2015 08:12:09 -0500 Received: from localhost.localdomain (unknown [210.21.223.3]) by smtp4 (Coremail) with SMTP id jdKowABXINyomuBUw_mjCw--.246S2; Sun, 15 Feb 2015 21:10:09 +0800 (CST) From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: rtc-linux@googlegroups.com, Thomas Gleixner , Alessandro Zummo , John Stultz , Arnd Bergmann , Peter Zijlstra , Xunlei Pang Subject: [PATCH v4 1/4] time: Add needed macros for timekeeping_inject_sleeptime64() Date: Sun, 15 Feb 2015 21:09:42 +0800 Message-Id: <1424005785-17865-1-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: jdKowABXINyomuBUw_mjCw--.246S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrKr18tF4kXw17CF17GFyrtFb_yoWkGrX_WF 92qFyku3W5AFyFg3yakan7XF98Kw4UGr4kZayIqF1xXrs0k3y8Aws3try5XrnxCF4xKwnx Can8Gry7Kr15WjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnenmtUUUUU== X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbipAehv1GofbGWkQAAsP Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: xlpang@126.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::236 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@; dmarc=fail (p=NONE dis=NONE) header.from=126.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Xunlei Pang timekeeping_inject_sleeptime64() is only used by RTC suspend/resume, so embrace it in RTC related macros. Signed-off-by: Xunlei Pang --- kernel/time/timekeeping.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index b124af2..d78a528 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1125,6 +1125,9 @@ static void __timekeeping_inject_sleeptime(struct timekeeper *tk, tk_debug_account_sleep_time(delta); } +#if defined(CONFIG_RTC_CLASS) && \ + defined(CONFIG_PM_SLEEP) && \ + defined(CONFIG_RTC_HCTOSYS_DEVICE) /** * timekeeping_inject_sleeptime64 - Adds suspend interval to timeekeeping values * @delta: pointer to a timespec64 delta value @@ -1162,6 +1165,7 @@ void timekeeping_inject_sleeptime64(struct timespec64 *delta) /* signal hrtimers about time change */ clock_was_set(); } +#endif /** * timekeeping_resume - Resumes the generic timekeeping subsystem.