mvebu: backport mainline patches from kernel 3.13
[openwrt/staging/yousong.git] / target / linux / mvebu / patches-3.10 / 0169-clocksource-armada-370-xp-Replace-WARN_ON-with-BUG_O.patch
1 From bcaac3d9265d751f7d20df6ed0ac24241308dff7 Mon Sep 17 00:00:00 2001
2 From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
3 Date: Tue, 20 Aug 2013 12:45:52 -0300
4 Subject: [PATCH 169/203] clocksource: armada-370-xp: Replace WARN_ON with
5 BUG_ON
6
7 If the clock fails to be obtained and the timer fails to be properly
8 registered, the kernel will freeze real soon. Instead, let's BUG()
9 where the actual problem is located.
10
11 Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
12 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
13 Acked-by: Jason Cooper <jason@lakedaemon.net>
14 Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
15 ---
16 drivers/clocksource/time-armada-370-xp.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 --- a/drivers/clocksource/time-armada-370-xp.c
20 +++ b/drivers/clocksource/time-armada-370-xp.c
21 @@ -306,7 +306,7 @@ static void __init armada_370_timer_init
22 {
23 struct clk *clk = of_clk_get(np, 0);
24
25 - WARN_ON(IS_ERR(clk));
26 + BUG_ON(IS_ERR(clk));
27 timer_clk = clk_get_rate(clk) / TIMER_DIVIDER;
28 timer25Mhz = false;
29