mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-15 14:10:43 +00:00
usb: musb: trivial cleanup
enabled && driver || !enabled can be simplified to !enabled || driver. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
772aed45b6
commit
b3314d9ac5
@ -245,13 +245,7 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
|
|||||||
case USB_EVENT_ID:
|
case USB_EVENT_ID:
|
||||||
dev_dbg(musb->controller, "ID GND\n");
|
dev_dbg(musb->controller, "ID GND\n");
|
||||||
|
|
||||||
if (is_otg_enabled(musb)) {
|
if (!is_otg_enabled(musb) || musb->gadget_driver) {
|
||||||
if (musb->gadget_driver) {
|
|
||||||
pm_runtime_get_sync(musb->controller);
|
|
||||||
otg_init(musb->xceiv);
|
|
||||||
omap2430_musb_set_vbus(musb, 1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
pm_runtime_get_sync(musb->controller);
|
pm_runtime_get_sync(musb->controller);
|
||||||
otg_init(musb->xceiv);
|
otg_init(musb->xceiv);
|
||||||
omap2430_musb_set_vbus(musb, 1);
|
omap2430_musb_set_vbus(musb, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user