提交 ac34ad27 编写于 作者: A Alexandre Belloni 提交者: Thomas Gleixner

clockevents: Do not suspend/resume if unused

There is no point in calling suspend/resume for unused clockevents as
they are already stopped and disabled.

This is really important for AT91 as the hardware is a trainwreck and
takes ages to synchronize.
Reported-by: NSylvain Rochet <sylvain.rochet@finsecur.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1421399151-26800-1-git-send-email-alexandre.belloni@free-electrons.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 e83d0a41
......@@ -638,7 +638,7 @@ void clockevents_suspend(void)
struct clock_event_device *dev;
list_for_each_entry_reverse(dev, &clockevent_devices, list)
if (dev->suspend)
if (dev->suspend && dev->mode != CLOCK_EVT_MODE_UNUSED)
dev->suspend(dev);
}
......@@ -650,7 +650,7 @@ void clockevents_resume(void)
struct clock_event_device *dev;
list_for_each_entry(dev, &clockevent_devices, list)
if (dev->resume)
if (dev->resume && dev->mode != CLOCK_EVT_MODE_UNUSED)
dev->resume(dev);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册