aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2015-12-04 12:48:17 -0500
committerDaniel Lezcano <daniel.lezcano@linaro.org>2015-12-16 05:33:35 -0500
commit6f2b611db23404426a2b21b343392dc1d9584f92 (patch)
tree6e9728d7e7e6d915e9f73f3524f21394abd6d8aa /drivers/clocksource
parentf37632d1e9ff8445e0d1ea761f4ce7b98e059d75 (diff)
clocksource/drivers/h8300: Initializer cleanup.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/h8300_timer8.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c
index 1ba453b47478..9087dd27ec69 100644
--- a/drivers/clocksource/h8300_timer8.c
+++ b/drivers/clocksource/h8300_timer8.c
@@ -33,7 +33,6 @@ struct timer8_priv {
33 void __iomem *mapbase; 33 void __iomem *mapbase;
34 unsigned long flags; 34 unsigned long flags;
35 unsigned int rate; 35 unsigned int rate;
36 unsigned int tcora;
37}; 36};
38 37
39static irqreturn_t timer8_interrupt(int irq, void *dev_id) 38static irqreturn_t timer8_interrupt(int irq, void *dev_id)
@@ -163,8 +162,6 @@ static void __init h8300_8timer_init(struct device_node *node)
163{ 162{
164 void __iomem *base; 163 void __iomem *base;
165 int irq; 164 int irq;
166 int ret = 0;
167 int rate;
168 struct clk *clk; 165 struct clk *clk;
169 166
170 clk = of_clk_get(node, 0); 167 clk = of_clk_get(node, 0);
@@ -187,20 +184,20 @@ static void __init h8300_8timer_init(struct device_node *node)
187 184
188 timer8_priv.mapbase = base; 185 timer8_priv.mapbase = base;
189 186
190 rate = clk_get_rate(clk) / SCALE; 187 timer8_priv.rate = clk_get_rate(clk) / SCALE;
191 if (!rate) { 188 if (!timer8_priv.rate) {
192 pr_err("Failed to get rate for the clocksource\n"); 189 pr_err("Failed to get rate for the clocksource\n");
193 goto unmap_reg; 190 goto unmap_reg;
194 } 191 }
195 192
196 ret = request_irq(irq, timer8_interrupt, 193 if (request_irq(irq, timer8_interrupt, IRQF_TIMER,
197 IRQF_TIMER, timer8_priv.ced.name, &timer8_priv); 194 timer8_priv.ced.name, &timer8_priv) < 0) {
198 if (ret < 0) {
199 pr_err("failed to request irq %d for clockevent\n", irq); 195 pr_err("failed to request irq %d for clockevent\n", irq);
200 goto unmap_reg; 196 goto unmap_reg;
201 } 197 }
202 198
203 clockevents_config_and_register(&timer8_priv.ced, rate, 1, 0x0000ffff); 199 clockevents_config_and_register(&timer8_priv.ced,
200 timer8_priv.rate, 1, 0x0000ffff);
204 201
205 return; 202 return;
206unmap_reg: 203unmap_reg: