提交 cd42fef0 编写于 作者: F Felipe Balbi 提交者: Greg Kroah-Hartman

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: NFelipe Balbi <felipe.balbi@nokia.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: NAnand Gadiyar <gadiyar@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 d4c433fe
......@@ -1521,6 +1521,14 @@ irqreturn_t musb_interrupt(struct musb *musb)
(devctl & MUSB_DEVCTL_HM) ? "host" : "peripheral",
musb->int_usb, musb->int_tx, musb->int_rx);
#ifdef CONFIG_USB_GADGET_MUSB_HDRC
if (is_otg_enabled(musb) || is_peripheral_enabled(musb))
if (!musb->gadget_driver) {
DBG(5, "No gadget driver loaded\n");
return IRQ_HANDLED;
}
#endif
/* the core can interrupt us for multiple reasons; docs have
* a generic interrupt flowchart to follow
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册