diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-14 14:06:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-14 14:06:43 -0400 |
commit | 3670901f73e889538a1b8283e8d6eb9962aab410 (patch) | |
tree | 30226e2a49475a59621dfe72b90fd3c1a2ef12ab | |
parent | b25c6cee55c720e5e8502aa37104409aacd16ad3 (diff) | |
parent | 54d46b7fbcbd00fe4b20a27208e5909facc714e3 (diff) |
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Ingo Molnar:
"A single clocksource driver suspend/resume fix"
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
clockevents/drivers/sh_cmt: Only perform clocksource suspend/resume if enabled
-rw-r--r-- | drivers/clocksource/sh_cmt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index b8ff3c64cc45..c96de14036a0 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c | |||
@@ -661,6 +661,9 @@ static void sh_cmt_clocksource_suspend(struct clocksource *cs) | |||
661 | { | 661 | { |
662 | struct sh_cmt_channel *ch = cs_to_sh_cmt(cs); | 662 | struct sh_cmt_channel *ch = cs_to_sh_cmt(cs); |
663 | 663 | ||
664 | if (!ch->cs_enabled) | ||
665 | return; | ||
666 | |||
664 | sh_cmt_stop(ch, FLAG_CLOCKSOURCE); | 667 | sh_cmt_stop(ch, FLAG_CLOCKSOURCE); |
665 | pm_genpd_syscore_poweroff(&ch->cmt->pdev->dev); | 668 | pm_genpd_syscore_poweroff(&ch->cmt->pdev->dev); |
666 | } | 669 | } |
@@ -669,6 +672,9 @@ static void sh_cmt_clocksource_resume(struct clocksource *cs) | |||
669 | { | 672 | { |
670 | struct sh_cmt_channel *ch = cs_to_sh_cmt(cs); | 673 | struct sh_cmt_channel *ch = cs_to_sh_cmt(cs); |
671 | 674 | ||
675 | if (!ch->cs_enabled) | ||
676 | return; | ||
677 | |||
672 | pm_genpd_syscore_poweron(&ch->cmt->pdev->dev); | 678 | pm_genpd_syscore_poweron(&ch->cmt->pdev->dev); |
673 | sh_cmt_start(ch, FLAG_CLOCKSOURCE); | 679 | sh_cmt_start(ch, FLAG_CLOCKSOURCE); |
674 | } | 680 | } |