diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 11:48:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 11:48:25 -0500 |
commit | e56425b135a8892d1e71ad5bb605d12c10efeb32 (patch) | |
tree | 9bb899e1b6b45a125bcc21554f3673878d932035 /kernel/time/clocksource.c | |
parent | 786f8ba2e9449a7f01ec6bc35838d0a335921061 (diff) | |
parent | 6622e670b26fbaa9c4ae7772a4d2d0abd3414b51 (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.c | 14 |
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; } | |||
453 | #endif /* CONFIG_CLOCKSOURCE_WATCHDOG */ | 453 | #endif /* CONFIG_CLOCKSOURCE_WATCHDOG */ |
454 | 454 | ||
455 | /** | 455 | /** |
456 | * clocksource_suspend - suspend the clocksource(s) | ||
457 | */ | ||
458 | void clocksource_suspend(void) | ||
459 | { | ||
460 | struct clocksource *cs; | ||
461 | |||
462 | list_for_each_entry_reverse(cs, &clocksource_list, list) | ||
463 | if (cs->suspend) | ||
464 | cs->suspend(cs); | ||
465 | } | ||
466 | |||
467 | /** | ||
456 | * clocksource_resume - resume the clocksource(s) | 468 | * clocksource_resume - resume the clocksource(s) |
457 | */ | 469 | */ |
458 | void clocksource_resume(void) | 470 | void clocksource_resume(void) |
@@ -461,7 +473,7 @@ void clocksource_resume(void) | |||
461 | 473 | ||
462 | list_for_each_entry(cs, &clocksource_list, list) | 474 | list_for_each_entry(cs, &clocksource_list, list) |
463 | if (cs->resume) | 475 | if (cs->resume) |
464 | cs->resume(); | 476 | cs->resume(cs); |
465 | 477 | ||
466 | clocksource_resume_watchdog(); | 478 | clocksource_resume_watchdog(); |
467 | } | 479 | } |