Skip to content

Commit

Permalink
drivers/clocksource/tcb_clksrc.c: fix init sequence
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Voss, Nikolaus authored and Linus Torvalds committed Jan 26, 2011
1 parent 52dbb90 commit 1817dc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/clocksource/tcb_clksrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 1817dc0

Please sign in to comment.