diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/time/clocksource.c | 12 | ||||
| -rw-r--r-- | kernel/time/timekeeping.c | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 08adacb2a1e..bd246660902 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
| @@ -441,6 +441,18 @@ static inline int clocksource_watchdog_kthread(void *data) { return 0; } | |||
| 441 | #endif /* CONFIG_CLOCKSOURCE_WATCHDOG */ | 441 | #endif /* CONFIG_CLOCKSOURCE_WATCHDOG */ |
| 442 | 442 | ||
| 443 | /** | 443 | /** |
| 444 | * clocksource_suspend - suspend the clocksource(s) | ||
| 445 | */ | ||
| 446 | void clocksource_suspend(void) | ||
| 447 | { | ||
| 448 | struct clocksource *cs; | ||
| 449 | |||
| 450 | list_for_each_entry_reverse(cs, &clocksource_list, list) | ||
| 451 | if (cs->suspend) | ||
| 452 | cs->suspend(cs); | ||
| 453 | } | ||
| 454 | |||
| 455 | /** | ||
| 444 | * clocksource_resume - resume the clocksource(s) | 456 | * clocksource_resume - resume the clocksource(s) |
| 445 | */ | 457 | */ |
| 446 | void clocksource_resume(void) | 458 | void clocksource_resume(void) |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 7faaa32fbf4..843d8a711b1 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
| @@ -622,6 +622,7 @@ static int timekeeping_suspend(struct sys_device *dev, pm_message_t state) | |||
| 622 | write_sequnlock_irqrestore(&xtime_lock, flags); | 622 | write_sequnlock_irqrestore(&xtime_lock, flags); |
| 623 | 623 | ||
| 624 | clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); | 624 | clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); |
| 625 | clocksource_suspend(); | ||
| 625 | 626 | ||
| 626 | return 0; | 627 | return 0; |
| 627 | } | 628 | } |
