aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/sh_mtu2.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-01 11:39:03 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-01 11:39:03 -0800
commitf5eab26701999b1aa26d06772e013b11c4a16f6a (patch)
treedcfbac21d754b7a6621127c53b9495e25af41c44 /drivers/clocksource/sh_mtu2.c
parent4bf690d7e09bbac43dfac9af01ba263e08f37e3e (diff)
parentfe326c5cc07cd265abad29c35c142cfae09889e4 (diff)
downloadlinux-f5eab26701999b1aa26d06772e013b11c4a16f6a.tar.gz
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner: "The last round of minimalistic fixes for clocksource drivers: - Prevent multiple shutdown of the sh_mtu2 clocksource - Annotate a bunch of clocksource/schedclock functions with notrace to prevent an annoying ftrace recursion issue" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/sh_mtu2: Fix multiple shutdown call issue clocksource/drivers/digicolor: Prevent ftrace recursion clocksource/drivers/fsl_ftm_timer: Prevent ftrace recursion clocksource/drivers/vf_pit_timer: Prevent ftrace recursion clocksource/drivers/prima2: Prevent ftrace recursion clocksource/drivers/samsung_pwm_timer: Prevent ftrace recursion clocksource/drivers/pistachio: Prevent ftrace recursion clocksource/drivers/arm_global_timer: Prevent ftrace recursion
Diffstat (limited to 'drivers/clocksource/sh_mtu2.c')
-rw-r--r--drivers/clocksource/sh_mtu2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index f1985da8113f..53aa7e92a7d7 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -280,7 +280,9 @@ static int sh_mtu2_clock_event_shutdown(struct clock_event_device *ced)
{
struct sh_mtu2_channel *ch = ced_to_sh_mtu2(ced);
- sh_mtu2_disable(ch);
+ if (clockevent_state_periodic(ced))
+ sh_mtu2_disable(ch);
+
return 0;
}