mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] AT91: usb gadget: fix freeing irq in _udc_remove()
       [not found] <AANLkTimV2ENcWajrrMQ2Too4pf=XBfLczJ9HehNt4V_8@mail.gmail.com>
@ 2010-12-14 15:05 ` Nicolas Ferre
  2010-12-14 16:21   ` David Brownell
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Ferre @ 2010-12-14 15:05 UTC (permalink / raw)
  To: gregkh, linux-usb, dbrownell
  Cc: linux-kernel, linux-arm-kernel, Rob Emanuele, Nicolas Ferre

From: Rob Emanuele <rje@crystalfontz.com>

Add a free_irq() call on vbus gpio when we remove udc so that the
vbus irq is properly released.

Signed-off-by: Rob Emanuele <rje@crystalfontz.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 drivers/usb/gadget/atmel_usba_udc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 717ff65..e7c65a4 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -2057,8 +2057,10 @@ static int __exit usba_udc_remove(struct platform_device *pdev)
 		usba_ep_cleanup_debugfs(&usba_ep[i]);
 	usba_cleanup_debugfs(udc);
 
-	if (gpio_is_valid(udc->vbus_pin))
+	if (gpio_is_valid(udc->vbus_pin)) {
+		free_irq(gpio_to_irq(udc->vbus_pin), udc);
 		gpio_free(udc->vbus_pin);
+	}
 
 	free_irq(udc->irq, udc);
 	kfree(usba_ep);
-- 
1.7.3


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

* Re: [PATCH] AT91: usb gadget: fix freeing irq in _udc_remove()
  2010-12-14 15:05 ` [PATCH] AT91: usb gadget: fix freeing irq in _udc_remove() Nicolas Ferre
@ 2010-12-14 16:21   ` David Brownell
  2010-12-14 18:00     ` [PATCH v2] USB: atmel_usba_udc: fix freeing irq in usba_udc_remove() Nicolas Ferre
  0 siblings, 1 reply; 4+ messages in thread
From: David Brownell @ 2010-12-14 16:21 UTC (permalink / raw)
  To: gregkh, linux-usb, dbrownell, Nicolas Ferre
  Cc: linux-kernel, linux-arm-kernel, Rob Emanuele, Nicolas Ferre

You _do_ know that $SUBJECT references
an entirely different driver than $PATCH ...


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

* [PATCH v2] USB: atmel_usba_udc: fix freeing irq in usba_udc_remove()
  2010-12-14 16:21   ` David Brownell
@ 2010-12-14 18:00     ` Nicolas Ferre
  2010-12-15  1:29       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Ferre @ 2010-12-14 18:00 UTC (permalink / raw)
  To: gregkh, linux-usb, dbrownell
  Cc: linux-kernel, linux-arm-kernel, Rob Emanuele, Nicolas Ferre

From: Rob Emanuele <rje@crystalfontz.com>

Add a free_irq() call on vbus gpio when we remove udc so that the
vbus irq is properly released.

Signed-off-by: Rob Emanuele <rje@crystalfontz.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
David,

I modified $SUBJECT to be more explicit about which driver is modified.
Hope that makes sense now...

Bye,

 drivers/usb/gadget/atmel_usba_udc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 717ff65..e7c65a4 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -2057,8 +2057,10 @@ static int __exit usba_udc_remove(struct platform_device *pdev)
 		usba_ep_cleanup_debugfs(&usba_ep[i]);
 	usba_cleanup_debugfs(udc);
 
-	if (gpio_is_valid(udc->vbus_pin))
+	if (gpio_is_valid(udc->vbus_pin)) {
+		free_irq(gpio_to_irq(udc->vbus_pin), udc);
 		gpio_free(udc->vbus_pin);
+	}
 
 	free_irq(udc->irq, udc);
 	kfree(usba_ep);
-- 
1.7.3


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

* Re: [PATCH v2] USB: atmel_usba_udc: fix freeing irq in usba_udc_remove()
  2010-12-14 18:00     ` [PATCH v2] USB: atmel_usba_udc: fix freeing irq in usba_udc_remove() Nicolas Ferre
@ 2010-12-15  1:29       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-12-15  1:29 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: gregkh, linux-usb, dbrownell, Rob Emanuele, linux-kernel,
	linux-arm-kernel

On 19:00 Tue 14 Dec     , Nicolas Ferre wrote:
> From: Rob Emanuele <rje@crystalfontz.com>
> 
> Add a free_irq() call on vbus gpio when we remove udc so that the
> vbus irq is properly released.
> 
> Signed-off-by: Rob Emanuele <rje@crystalfontz.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.

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

end of thread, other threads:[~2010-12-15  1:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AANLkTimV2ENcWajrrMQ2Too4pf=XBfLczJ9HehNt4V_8@mail.gmail.com>
2010-12-14 15:05 ` [PATCH] AT91: usb gadget: fix freeing irq in _udc_remove() Nicolas Ferre
2010-12-14 16:21   ` David Brownell
2010-12-14 18:00     ` [PATCH v2] USB: atmel_usba_udc: fix freeing irq in usba_udc_remove() Nicolas Ferre
2010-12-15  1:29       ` Jean-Christophe PLAGNIOL-VILLARD

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

all inboxes | Powered by JetHome®