Răsfoiți Sursa

clocksource, sparc32: Convert to using clocksource_register_hz()

While cleaning up some clocksource code, I noticed the
time_32 implementation uses the clocksource_hz2mult()
helper, but doesn't use the clocksource_register_hz()
method.

I don't believe the Sparc clocksource is a default
clocksource, so we shouldn't need to self-define
the mult/shift pair.

So convert the time_32.c implementation to use
clocksource_register_hz().

Untested.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1426133800-29329-11-git-send-email-john.stultz@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
John Stultz 10 ani în urmă
părinte
comite
3142f76022
1 a modificat fișierele cu 1 adăugiri și 5 ștergeri
  1. 1 5
      arch/sparc/kernel/time_32.c

+ 1 - 5
arch/sparc/kernel/time_32.c

@@ -181,17 +181,13 @@ static struct clocksource timer_cs = {
 	.rating	= 100,
 	.rating	= 100,
 	.read	= timer_cs_read,
 	.read	= timer_cs_read,
 	.mask	= CLOCKSOURCE_MASK(64),
 	.mask	= CLOCKSOURCE_MASK(64),
-	.shift	= 2,
 	.flags	= CLOCK_SOURCE_IS_CONTINUOUS,
 	.flags	= CLOCK_SOURCE_IS_CONTINUOUS,
 };
 };
 
 
 static __init int setup_timer_cs(void)
 static __init int setup_timer_cs(void)
 {
 {
 	timer_cs_enabled = 1;
 	timer_cs_enabled = 1;
-	timer_cs.mult = clocksource_hz2mult(sparc_config.clock_rate,
-	                                    timer_cs.shift);
-
-	return __clocksource_register(&timer_cs);
+	return clocksource_register_hz(&timer_cs, sparc_config.clock_rate);
 }
 }
 
 
 #ifdef CONFIG_SMP
 #ifdef CONFIG_SMP