clocksource: samsung_pwm_timer: Do not request PWM mem region
authorTomasz Figa <tomasz.figa@gmail.com>
Thu, 13 Jun 2013 19:22:44 +0000 (21:22 +0200)
committerTomasz Figa <tomasz.figa@gmail.com>
Mon, 5 Aug 2013 23:21:40 +0000 (01:21 +0200)
PWM registers are shared between clocksource and PWM drivers and so can
not be claimed for exclusive use.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Mark Brown <broonie@linaro.org>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
drivers/clocksource/samsung_pwm_timer.c

index 584b5472eea3e4f593c50dbea18cd5a78fe9d826..3fa5b07fa50d8471603337d2c23f33c9da8a9c75 100644 (file)
@@ -404,7 +404,6 @@ void __init samsung_pwm_clocksource_init(void __iomem *base,
 static void __init samsung_pwm_alloc(struct device_node *np,
                                     const struct samsung_pwm_variant *variant)
 {
-       struct resource res;
        struct property *prop;
        const __be32 *cur;
        u32 val;
@@ -423,17 +422,9 @@ static void __init samsung_pwm_alloc(struct device_node *np,
                pwm.variant.output_mask |= 1 << val;
        }
 
-       of_address_to_resource(np, 0, &res);
-       if (!request_mem_region(res.start,
-                               resource_size(&res), "samsung-pwm")) {
-               pr_err("%s: failed to request IO mem region\n", __func__);
-               return;
-       }
-
-       pwm.base = ioremap(res.start, resource_size(&res));
+       pwm.base = of_iomap(np, 0);
        if (!pwm.base) {
                pr_err("%s: failed to map PWM registers\n", __func__);
-               release_mem_region(res.start, resource_size(&res));
                return;
        }