Skip to content

Commit

Permalink
ARC: Use clockevents_config_and_register over clockevents_register_de…
Browse files Browse the repository at this point in the history
…vice

clockevents_config_and_register is more clever and correct than doing it
by hand; so use it.

[vgupta: fixed build failure due to missing ; in patch]

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Uwe Kleine-König authored and Vineet Gupta committed Sep 27, 2013
1 parent 6c00350 commit 55c2e26
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions arch/arc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,9 @@ void __attribute__((weak)) arc_local_timer_setup(unsigned int cpu)
{
struct clock_event_device *clk = &per_cpu(arc_clockevent_device, cpu);

clockevents_calc_mult_shift(clk, arc_get_core_freq(), 5);

clk->max_delta_ns = clockevent_delta2ns(ARC_TIMER_MAX, clk);
clk->cpumask = cpumask_of(cpu);

clockevents_register_device(clk);
clockevents_config_and_register(clk, arc_get_core_freq(),
0, ARC_TIMER_MAX);

/*
* setup the per-cpu timer IRQ handler - for all cpus
Expand Down

0 comments on commit 55c2e26

Please sign in to comment.