summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorVoss, Nikolaus <N.Voss@weinmann.de>2011-01-25 15:07:29 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-26 10:50:04 +1000
commit1817dc0370873caff77b924b53ae489edaf9b1e2 (patch)
tree504f5d5e89c57c8b089cb022d1aa0191b48d9187 /drivers/clocksource
parent52dbb9050936fd33ceb45f10529dbc992507c058 (diff)
downloadop-kernel-dev-1817dc0370873caff77b924b53ae489edaf9b1e2.zip
op-kernel-dev-1817dc0370873caff77b924b53ae489edaf9b1e2.tar.gz
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 <n.voss@weinmann.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/tcb_clksrc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
index 01b886e..79c47e8 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 */
OpenPOWER on IntegriCloud