summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/time.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2009-01-26 16:34:51 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 10:33:52 +0100
commit058b7a6f465bebd87c1f295afdd56cc6a33dffbd (patch)
treeb7060b4d4675d83cf086891d714a34e5e7af7472 /arch/arm/plat-mxc/time.c
parentedfcea80eb12b43680c4be0f2e31c8f5b1288edd (diff)
arm/imx2x: removes a bunch of sparse-warnings
Here are some of the warnings that get fixed by this: > 200 times: warning: cast adds address space to expression (<asn:2>) twelve times: warning: symbol 'xxx' was not declared. Should it be static two times: warning: symbol 'clock' shadows an earlier one five times: warning: incorrect type in initializer (different address spaces) Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/time.c')
-rw-r--r--arch/arm/plat-mxc/time.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
index eb93fd1789db..ef1b3cd85bd3 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/plat-mxc/time.c
@@ -52,11 +52,9 @@ static struct clocksource clocksource_mxc = {
static int __init mxc_clocksource_init(struct clk *timer_clk)
{
- unsigned int clock;
+ unsigned int c = clk_get_rate(timer_clk);
- clock = clk_get_rate(timer_clk);
-
- clocksource_mxc.mult = clocksource_hz2mult(clock,
+ clocksource_mxc.mult = clocksource_hz2mult(c,
clocksource_mxc.shift);
clocksource_register(&clocksource_mxc);
@@ -176,11 +174,9 @@ static struct clock_event_device clockevent_mxc = {
static int __init mxc_clockevent_init(struct clk *timer_clk)
{
- unsigned int clock;
-
- clock = clk_get_rate(timer_clk);
+ unsigned int c = clk_get_rate(timer_clk);
- clockevent_mxc.mult = div_sc(clock, NSEC_PER_SEC,
+ clockevent_mxc.mult = div_sc(c, NSEC_PER_SEC,
clockevent_mxc.shift);
clockevent_mxc.max_delta_ns =
clockevent_delta2ns(0xfffffffe, &clockevent_mxc);