[tip:timers/core] time: Don' t build timekeeping_inject_sleeptime64() if no one uses it

From: tip-bot for Xunlei Pang
Date: Fri Apr 03 2015 - 04:20:25 EST


Commit-ID: 7f2981393af31a854879f2496cab4c978e886902
Gitweb: http://git.kernel.org/tip/7f2981393af31a854879f2496cab4c978e886902
Author: Xunlei Pang <pang.xunlei@xxxxxxxxxx>
AuthorDate: Wed, 1 Apr 2015 20:34:35 -0700
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Fri, 3 Apr 2015 08:18:31 +0200

time: Don't build timekeeping_inject_sleeptime64() if no one uses it

timekeeping_inject_sleeptime64() is only used by RTC
suspend/resume, so add build dependencies on the necessary RTC
related macros.

Signed-off-by: Xunlei Pang <pang.xunlei@xxxxxxxxxx>
[ Improve commit message clarity. ]
Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Link: http://lkml.kernel.org/r/1427945681-29972-16-git-send-email-john.stultz@xxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
kernel/time/timekeeping.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index b1dbfa5..3be559b 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1280,6 +1280,7 @@ static void __timekeeping_inject_sleeptime(struct timekeeper *tk,
tk_debug_account_sleep_time(delta);
}

+#if 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
@@ -1317,6 +1318,7 @@ void timekeeping_inject_sleeptime64(struct timespec64 *delta)
/* signal hrtimers about time change */
clock_was_set();
}
+#endif

/**
* timekeeping_resume - Resumes the generic timekeeping subsystem.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/