From: Tomasz Figa Date: Sun, 16 Jun 2013 21:21:14 +0000 (+0900) Subject: clocksource: samsung_pwm_timer: Do not request PWM mem region X-Git-Tag: next-20130617~9^2^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a3ce54f00310d5e5911e43acdd9424e0595a99d0;p=karo-tx-linux.git clocksource: samsung_pwm_timer: Do not request PWM mem region PWM registers are shared between clocksource and PWM drivers and so can not be claimed for exclusive use. Signed-off-by: Tomasz Figa Acked-by: Olof Johansson Signed-off-by: Kukjin Kim --- diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c index 0234c8d2c8f2..553115bd4355 100644 --- a/drivers/clocksource/samsung_pwm_timer.c +++ b/drivers/clocksource/samsung_pwm_timer.c @@ -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; }