public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pwm: renesas-tpu: Add missing pwmchip_remove() call in tpu_remove()
@ 2013-05-19  5:45 Axel Lin
  2013-05-19 14:22 ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2013-05-19  5:45 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Laurent Pinchart, Simon Horman, linux-kernel

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/pwm/pwm-renesas-tpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
index 8e6d8d7..351addd 100644
--- a/drivers/pwm/pwm-renesas-tpu.c
+++ b/drivers/pwm/pwm-renesas-tpu.c
@@ -444,7 +444,7 @@ static int tpu_remove(struct platform_device *pdev)
 
 	pm_runtime_disable(&pdev->dev);
 
-	return 0;
+	return pwmchip_remove(&tpu->chip);
 }
 
 static struct platform_driver tpu_driver = {
-- 
1.8.1.2




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

* Re: [PATCH] pwm: renesas-tpu: Add missing pwmchip_remove() call in tpu_remove()
  2013-05-19  5:45 [PATCH] pwm: renesas-tpu: Add missing pwmchip_remove() call in tpu_remove() Axel Lin
@ 2013-05-19 14:22 ` Laurent Pinchart
  2013-05-20  1:18   ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2013-05-19 14:22 UTC (permalink / raw)
  To: Axel Lin; +Cc: Thierry Reding, Laurent Pinchart, Simon Horman, linux-kernel

Hi Axel,

Thank you for the patch.

On Sunday 19 May 2013 13:45:31 Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/pwm/pwm-renesas-tpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
> index 8e6d8d7..351addd 100644
> --- a/drivers/pwm/pwm-renesas-tpu.c
> +++ b/drivers/pwm/pwm-renesas-tpu.c
> @@ -444,7 +444,7 @@ static int tpu_remove(struct platform_device *pdev)
> 
>  	pm_runtime_disable(&pdev->dev);
> 
> -	return 0;
> +	return pwmchip_remove(&tpu->chip);

Could you please move that line at the beginning of the function ? There would 
be a race condition otherwise, as the user could reenable PWM between the 
tpu_pwm_timer_stop() calls and the pwmchip_remove() call.

Apart from that, the patch looks good.

>  }
> 
>  static struct platform_driver tpu_driver = {

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH] pwm: renesas-tpu: Add missing pwmchip_remove() call in tpu_remove()
  2013-05-19 14:22 ` Laurent Pinchart
@ 2013-05-20  1:18   ` Simon Horman
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Horman @ 2013-05-20  1:18 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Axel Lin, Thierry Reding, Laurent Pinchart, linux-kernel

On Sun, May 19, 2013 at 04:22:21PM +0200, Laurent Pinchart wrote:
> Hi Axel,
> 
> Thank you for the patch.
> 
> On Sunday 19 May 2013 13:45:31 Axel Lin wrote:
> > Signed-off-by: Axel Lin <axel.lin@ingics.com>
> > ---
> >  drivers/pwm/pwm-renesas-tpu.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
> > index 8e6d8d7..351addd 100644
> > --- a/drivers/pwm/pwm-renesas-tpu.c
> > +++ b/drivers/pwm/pwm-renesas-tpu.c
> > @@ -444,7 +444,7 @@ static int tpu_remove(struct platform_device *pdev)
> > 
> >  	pm_runtime_disable(&pdev->dev);
> > 
> > -	return 0;
> > +	return pwmchip_remove(&tpu->chip);
> 
> Could you please move that line at the beginning of the function ? There would 
> be a race condition otherwise, as the user could reenable PWM between the 
> tpu_pwm_timer_stop() calls and the pwmchip_remove() call.
> 
> Apart from that, the patch looks good.

Also, could you please CC linux-sh@vger.kernel.org,
that will help me track the change through patchwork.

Thanks!

> 
> >  }
> > 
> >  static struct platform_driver tpu_driver = {
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 

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

end of thread, other threads:[~2013-05-20  1:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-19  5:45 [PATCH] pwm: renesas-tpu: Add missing pwmchip_remove() call in tpu_remove() Axel Lin
2013-05-19 14:22 ` Laurent Pinchart
2013-05-20  1:18   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox