Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1817dc03 authored by Voss, Nikolaus's avatar Voss, Nikolaus Committed by Linus Torvalds
Browse files

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: default avatarNikolaus Voss <n.voss@weinmann.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 52dbb905
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 */