Commit 71c87452 authored by Russell King's avatar Russell King

ARM: s5pv310: update clock source registration

In d7e81c26 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants.  Switch over to using this new interface.
Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent f62ae0ce
...@@ -211,7 +211,6 @@ struct clocksource pwm_clocksource = { ...@@ -211,7 +211,6 @@ struct clocksource pwm_clocksource = {
.rating = 250, .rating = 250,
.read = s5pv310_pwm4_read, .read = s5pv310_pwm4_read,
.mask = CLOCKSOURCE_MASK(32), .mask = CLOCKSOURCE_MASK(32),
.shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS , .flags = CLOCK_SOURCE_IS_CONTINUOUS ,
}; };
...@@ -230,10 +229,7 @@ static void __init s5pv310_clocksource_init(void) ...@@ -230,10 +229,7 @@ static void __init s5pv310_clocksource_init(void)
s5pv310_pwm_init(4, ~0); s5pv310_pwm_init(4, ~0);
s5pv310_pwm_start(4, 1); s5pv310_pwm_start(4, 1);
pwm_clocksource.mult = if (clocksource_register_hz(&pwm_clocksource, clock_rate))
clocksource_khz2mult(clock_rate/1000, pwm_clocksource.shift);
if (clocksource_register(&pwm_clocksource))
panic("%s: can't register clocksource\n", pwm_clocksource.name); panic("%s: can't register clocksource\n", pwm_clocksource.name);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment