diff options
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 | } |