aboutsummaryrefslogtreecommitdiff
path: root/kernel/time/clocksource.c
diff options
context:
space:
mode:
authorLinus Torvalds2010-03-01 08:48:25 -0800
committerLinus Torvalds2010-03-01 08:48:25 -0800
commite56425b135a8892d1e71ad5bb605d12c10efeb32 (patch)
tree9bb899e1b6b45a125bcc21554f3673878d932035 /kernel/time/clocksource.c
parent786f8ba2e9449a7f01ec6bc35838d0a335921061 (diff)
parent6622e670b26fbaa9c4ae7772a4d2d0abd3414b51 (diff)
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: posix-timers.c: Don't export local functions clocksource: start CMT at clocksource resume clocksource: add suspend callback clocksource: add argument to resume callback ntp: Cleanup xtime references in ntp.c ntp: Make time_esterror and time_maxerror static
Diffstat (limited to 'kernel/time/clocksource.c')
-rw-r--r--kernel/time/clocksource.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 13700833c181..1f663d23e85e 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -453,6 +453,18 @@ static inline int clocksource_watchdog_kthread(void *data) { return 0; }
#endif /* CONFIG_CLOCKSOURCE_WATCHDOG */
/**
+ * clocksource_suspend - suspend the clocksource(s)
+ */
+void clocksource_suspend(void)
+{
+ struct clocksource *cs;
+
+ list_for_each_entry_reverse(cs, &clocksource_list, list)
+ if (cs->suspend)
+ cs->suspend(cs);
+}
+
+/**
* clocksource_resume - resume the clocksource(s)
*/
void clocksource_resume(void)
@@ -461,7 +473,7 @@ void clocksource_resume(void)
list_for_each_entry(cs, &clocksource_list, list)
if (cs->resume)
- cs->resume();
+ cs->resume(cs);
clocksource_resume_watchdog();
}