From: Voss, Nikolaus Date: Tue, 25 Jan 2011 23:07:29 +0000 (-0800) Subject: drivers/clocksource/tcb_clksrc.c: fix init sequence X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1817dc0370873caff77b924b53ae489edaf9b1e2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drivers/clocksource/tcb_clksrc.c: fix init sequence setup_irq() was called before clockevents_register_device() which is needed by the irq handler. Bug was reproducible by restarting the kernel using kexec (reliable crash). Signed-off-by: Nikolaus Voss Cc: David Brownell Cc: Haavard Skinnemoen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c index 01b886e68822..79c47e88d5d1 100644 --- a/drivers/clocksource/tcb_clksrc.c +++ b/drivers/clocksource/tcb_clksrc.c @@ -196,9 +196,9 @@ static void __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx) clkevt.clkevt.min_delta_ns = clockevent_delta2ns(1, &clkevt.clkevt) + 1; clkevt.clkevt.cpumask = cpumask_of(0); - setup_irq(irq, &tc_irqaction); - clockevents_register_device(&clkevt.clkevt); + + setup_irq(irq, &tc_irqaction); } #else /* !CONFIG_GENERIC_CLOCKEVENTS */