mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xunlei Pang <xlpang@126.com>
To: linux-kernel@vger.kernel.org
Cc: rtc-linux@googlegroups.com, Thomas Gleixner <tglx@linutronix.de>,
	Alessandro Zummo <a.zummo@towertech.it>,
	John Stultz <john.stultz@linaro.org>,
	Arnd Bergmann <arnd.bergmann@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Xunlei Pang <pang.xunlei@linaro.org>
Subject: [PATCH v4 1/4] time: Add needed macros for timekeeping_inject_sleeptime64()
Date: Sun, 15 Feb 2015 21:09:42 +0800	[thread overview]
Message-ID: <1424005785-17865-1-git-send-email-xlpang@126.com> (raw)

From: Xunlei Pang <pang.xunlei@linaro.org>

timekeeping_inject_sleeptime64() is only used by RTC suspend/resume,
so embrace it in RTC related macros.

Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
---
 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.
-- 
1.9.1



             reply	other threads:[~2015-02-15 13:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-15 13:09 Xunlei Pang [this message]
2015-02-15 13:09 ` [PATCH v4 2/4] time: Fix a bug in timekeeping_suspend() with no persistent clock Xunlei Pang
2015-02-15 13:09 ` [PATCH v4 3/4] time: rtc: Don't bother into rtc_resume() for the nonstop clocksource Xunlei Pang
2015-02-26  5:00   ` John Stultz
2015-02-15 13:09 ` [PATCH v4 4/4] rtc: Remove redundant rtc_valid_tm() from rtc_resume() Xunlei Pang
2015-02-26  5:08 ` [PATCH v4 1/4] time: Add needed macros for timekeeping_inject_sleeptime64() John Stultz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424005785-17865-1-git-send-email-xlpang@126.com \
    --to=xlpang@126.com \
    --cc=a.zummo@towertech.it \
    --cc=arnd.bergmann@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pang.xunlei@linaro.org \
    --cc=peterz@infradead.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®