summaryrefslogtreecommitdiff
path: root/kernel/power/power.h
diff options
context:
space:
mode:
authorTina Ruchandani <ruchandani.tina@gmail.com>2014-10-30 11:04:53 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-11-03 01:02:55 +0100
commitdb597605821fccc49876705aea5db5443d67e53e (patch)
treee5893b616676da8feebd574df23270e0f1cfb41d /kernel/power/power.h
parent0df1f2487d2f0d04703f142813d53615d62a1da4 (diff)
PM / Hibernate: Migrate to ktime_t
This patch migrates swsusp_show_speed and its callers to using ktime_t instead of 'struct timeval' which suffers from the y2038 problem. Changes to swsusp_show_speed: - use ktime_t for start and stop times - pass start and stop times by value Calling functions affected: - load_image - load_image_lzo - save_image - save_image_lzo - hibernate_preallocate_memory Design decisions: - use ktime_t to preserve same granularity of reporting as before - use centisecs logic as before to avoid 'div by zero' issues caused by using seconds and nanoseconds directly - use monotonic time (ktime_get()) since we only care about elapsed time. Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com> Suggested-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
index 2df883a9d3cb..ce9b8328a689 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -174,8 +174,7 @@ extern int hib_wait_on_bio_chain(struct bio **bio_chain);
struct timeval;
/* kernel/power/swsusp.c */
-extern void swsusp_show_speed(struct timeval *, struct timeval *,
- unsigned int, char *);
+extern void swsusp_show_speed(ktime_t, ktime_t, unsigned int, char *);
#ifdef CONFIG_SUSPEND
/* kernel/power/suspend.c */