diff options
author | Felipe Balbi <felipe.balbi@nokia.com> | 2009-12-15 06:47:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-23 14:34:17 -0500 |
commit | cd42fef0a0b061817904fd6feb0de66830794857 (patch) | |
tree | 39f03b9d03f517c644b6e463ee733ee0959c2104 | |
parent | d4c433fe6f04195a1a0d2146d9f11ad45eecef86 (diff) |
USB: musb: do not work if no gadget driver is loaded
On OTG and gadget-only configurations, we need a gadget driver
in order to work properly, so avoid changing operation modes
when there's no gadget driver loaded.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/musb/musb_core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 1041bb734bb4..24ff09754e0c 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1521,6 +1521,14 @@ irqreturn_t musb_interrupt(struct musb *musb) | |||
1521 | (devctl & MUSB_DEVCTL_HM) ? "host" : "peripheral", | 1521 | (devctl & MUSB_DEVCTL_HM) ? "host" : "peripheral", |
1522 | musb->int_usb, musb->int_tx, musb->int_rx); | 1522 | musb->int_usb, musb->int_tx, musb->int_rx); |
1523 | 1523 | ||
1524 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
1525 | if (is_otg_enabled(musb) || is_peripheral_enabled(musb)) | ||
1526 | if (!musb->gadget_driver) { | ||
1527 | DBG(5, "No gadget driver loaded\n"); | ||
1528 | return IRQ_HANDLED; | ||
1529 | } | ||
1530 | #endif | ||
1531 | |||
1524 | /* the core can interrupt us for multiple reasons; docs have | 1532 | /* the core can interrupt us for multiple reasons; docs have |
1525 | * a generic interrupt flowchart to follow | 1533 | * a generic interrupt flowchart to follow |
1526 | */ | 1534 | */ |