diff mbox

[v5,1/4] time: Add needed macros for timekeeping_inject_sleeptime64()

Message ID 1425882471-5591-1-git-send-email-xlpang@126.com
State Accepted
Headers show

Commit Message

Xunlei Pang March 9, 2015, 6:27 a.m. UTC
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>
---
v5 changes:
Remove CONFIG_RTC_CLASS.

 kernel/time/timekeeping.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

pang.xunlei@zte.com.cn March 18, 2015, 12:45 p.m. UTC | #1
Ping John ...

> 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>
> ---
> v5 changes:
> Remove CONFIG_RTC_CLASS.
> 
>  kernel/time/timekeeping.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
> index b124af2..49b1643 100644
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -1125,6 +1125,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
> @@ -1162,6 +1163,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
> 
> 
--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s).  If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited.  If you have received this mail in error, please delete it and notify us immediately.
John Stultz March 18, 2015, 5:25 p.m. UTC | #2
On Sun, Mar 8, 2015 at 11:27 PM, Xunlei Pang <xlpang@126.com> wrote:
> 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>

Queued this patch with an improved commit message.

thanks
-john
diff mbox

Patch

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index b124af2..49b1643 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1125,6 +1125,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
@@ -1162,6 +1163,7 @@  void timekeeping_inject_sleeptime64(struct timespec64 *delta)
 	/* signal hrtimers about time change */
 	clock_was_set();
 }
+#endif
 
 /**
  * timekeeping_resume - Resumes the generic timekeeping subsystem.