diff options
Diffstat (limited to 'drivers/clocksource/clps711x.c')
-rw-r--r-- | drivers/clocksource/clps711x.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/clocksource/clps711x.c b/drivers/clocksource/clps711x.c index a49853f2b5..f6399e9300 100644 --- a/drivers/clocksource/clps711x.c +++ b/drivers/clocksource/clps711x.c @@ -29,6 +29,7 @@ static struct clocksource clps711x_cs = { static int clps711x_cs_probe(struct device_d *dev) { + struct resource *iores; u32 rate; struct clk *timer_clk; @@ -37,11 +38,12 @@ static int clps711x_cs_probe(struct device_d *dev) return PTR_ERR(timer_clk); rate = clk_get_rate(timer_clk); - clps711x_timer_base = dev_request_mem_region(dev, 0); - if (IS_ERR(clps711x_timer_base)) { + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) { clk_put(timer_clk); - return PTR_ERR(clps711x_timer_base); + return PTR_ERR(iores); } + clps711x_timer_base = IOMEM(iores->start); clocks_calc_mult_shift(&clps711x_cs.mult, &clps711x_cs.shift, rate, NSEC_PER_SEC, 10); |