]> git.baikalelectronics.ru Git - kernel.git/commit
clockevents: Shutdown detached clockevent device
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 10 Apr 2015 07:26:41 +0000 (12:56 +0530)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 24 Apr 2015 19:01:48 +0000 (21:01 +0200)
commit391ab3994c2514a81e183f0e521e017e8489a7f4
treee895aa0d171944c4c9a7cc499e5f1e271180fecd
parentba18398ba376733739dca6c8810460ed2b55a783
clockevents: Shutdown detached clockevent device

A clockevent device is marked DETACHED when it is replaced by another
clockevent device.

The device is shutdown properly for drivers that implement legacy
->set_mode() callback, as we call ->set_mode() for CLOCK_EVT_MODE_UNUSED
as well.

But for the new per-state callback interface, we skip shutting down the
device, as we thought its an internal state change. That wasn't correct.

The effect is that the device is left programmed in oneshot or periodic
mode.

Fall-back to 'case CLOCK_EVT_STATE_SHUTDOWN', to shutdown the device.

Fixes: e3afcf0c1b5c "clockevents: Introduce mode specific callbacks"
Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linaro-kernel@lists.linaro.org
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/eef0a91c51b74d4e52c8e5a95eca27b5a0563f07.1428650683.git.viresh.kumar@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/time/clockevents.c