linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clocksource: samsung_pwm_timer: Do not request PWM mem region
@ 2013-06-13 19:22 Tomasz Figa
  2013-06-14 21:51 ` Olof Johansson
  0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Figa @ 2013-06-13 19:22 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/clocksource/samsung_pwm_timer.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c
index 0234c8d..553115b 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;
 	}
 
-- 
1.8.2.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] clocksource: samsung_pwm_timer: Do not request PWM mem region
  2013-06-13 19:22 [PATCH] clocksource: samsung_pwm_timer: Do not request PWM mem region Tomasz Figa
@ 2013-06-14 21:51 ` Olof Johansson
  2013-06-15  2:25   ` Kukjin Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Olof Johansson @ 2013-06-14 21:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 13, 2013 at 09:22:44PM +0200, Tomasz Figa wrote:
> 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>

Acked-by: Olof Johansson <olof@lixom.net>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] clocksource: samsung_pwm_timer: Do not request PWM mem region
  2013-06-14 21:51 ` Olof Johansson
@ 2013-06-15  2:25   ` Kukjin Kim
  0 siblings, 0 replies; 3+ messages in thread
From: Kukjin Kim @ 2013-06-15  2:25 UTC (permalink / raw)
  To: linux-arm-kernel

Olof Johansson wrote:
> 
> On Thu, Jun 13, 2013 at 09:22:44PM +0200, Tomasz Figa wrote:
> > 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>
> 
> Acked-by: Olof Johansson <olof@lixom.net>

Thanks, applied.

- Kukjin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-15  2:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-13 19:22 [PATCH] clocksource: samsung_pwm_timer: Do not request PWM mem region Tomasz Figa
2013-06-14 21:51 ` Olof Johansson
2013-06-15  2:25   ` Kukjin Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).