usb: musb: trivial cleanup
authorFelipe Contreras <felipe.contreras@gmail.com>
Mon, 19 Dec 2011 20:17:49 +0000 (22:17 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 20 Dec 2011 11:54:52 +0000 (13:54 +0200)
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>
drivers/usb/musb/omap2430.c

index c24dc26b9be2e9b94166961369f8d18bc3dedc3f..34c169896836b686d7f956fd41c829149971c0a8 100644 (file)
@@ -245,13 +245,7 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
        case USB_EVENT_ID:
                dev_dbg(musb->controller, "ID GND\n");
 
-               if (is_otg_enabled(musb)) {
-                       if (musb->gadget_driver) {
-                               pm_runtime_get_sync(musb->controller);
-                               otg_init(musb->xceiv);
-                               omap2430_musb_set_vbus(musb, 1);
-                       }
-               } else {
+               if (!is_otg_enabled(musb) || musb->gadget_driver) {
                        pm_runtime_get_sync(musb->controller);
                        otg_init(musb->xceiv);
                        omap2430_musb_set_vbus(musb, 1);