aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/musb/musb_core.c8
-rw-r--r--drivers/usb/musb/musb_core.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 8b14437331c7..83720f61fdba 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1840,7 +1840,7 @@ static void musb_free(struct musb *musb)
1840 musb_gadget_cleanup(musb); 1840 musb_gadget_cleanup(musb);
1841#endif 1841#endif
1842 1842
1843 if (musb->nIrq >= 0) { 1843 if (musb->nIrq >= 0 && musb->irq_wake) {
1844 disable_irq_wake(musb->nIrq); 1844 disable_irq_wake(musb->nIrq);
1845 free_irq(musb->nIrq, musb); 1845 free_irq(musb->nIrq, musb);
1846 } 1846 }
@@ -1993,8 +1993,12 @@ bad_config:
1993 } 1993 }
1994 musb->nIrq = nIrq; 1994 musb->nIrq = nIrq;
1995/* FIXME this handles wakeup irqs wrong */ 1995/* FIXME this handles wakeup irqs wrong */
1996 if (enable_irq_wake(nIrq) == 0) 1996 if (enable_irq_wake(nIrq) == 0) {
1997 musb->irq_wake = 1;
1997 device_init_wakeup(dev, 1); 1998 device_init_wakeup(dev, 1);
1999 } else {
2000 musb->irq_wake = 0;
2001 }
1998 2002
1999 pr_info("%s: USB %s mode controller at %p using %s, IRQ %d\n", 2003 pr_info("%s: USB %s mode controller at %p using %s, IRQ %d\n",
2000 musb_driver_name, 2004 musb_driver_name,
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index b3d605073071..d45d258e63f0 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -359,6 +359,7 @@ struct musb {
359 struct otg_transceiver xceiv; 359 struct otg_transceiver xceiv;
360 360
361 int nIrq; 361 int nIrq;
362 unsigned irq_wake:1;
362 363
363 struct musb_hw_ep endpoints[MUSB_C_NUM_EPS]; 364 struct musb_hw_ep endpoints[MUSB_C_NUM_EPS];
364#define control_ep endpoints 365#define control_ep endpoints