summaryrefslogtreecommitdiffstats
path: root/kernel/time/timekeeping.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-06-14 10:16:06 +0100
committerMark Brown <broonie@linaro.org>2013-06-14 10:16:06 +0100
commit384b8345589cbbb18a99ce1b112da90c58c802e8 (patch)
tree51fee39fa19adad6b24fb90123e7a0ca3159c9c5 /kernel/time/timekeeping.c
parent9c24b1672283644adf871244771ebf387dd73f90 (diff)
parent2e7ee15ced914e109a1a5b6dfcd463d846a13bd5 (diff)
Merge branch 'fix/wm8962' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-wm8962
Conflicts: sound/soc/codecs/wm8962.c
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r--kernel/time/timekeeping.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 98cd470bbe4..baeeb5c87cf 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -975,6 +975,14 @@ static int timekeeping_suspend(void)
read_persistent_clock(&timekeeping_suspend_time);
+ /*
+ * On some systems the persistent_clock can not be detected at
+ * timekeeping_init by its return value, so if we see a valid
+ * value returned, update the persistent_clock_exists flag.
+ */
+ if (timekeeping_suspend_time.tv_sec || timekeeping_suspend_time.tv_nsec)
+ persistent_clock_exist = true;
+
raw_spin_lock_irqsave(&timekeeper_lock, flags);
write_seqcount_begin(&timekeeper_seq);
timekeeping_forward_now(tk);