usb: musb: omap: remove the check before calling otg_set_vbus
authorKishon Vijay Abraham I <kishon@ti.com>
Thu, 14 Mar 2013 06:23:56 +0000 (11:53 +0530)
committerFelipe Balbi <balbi@ti.com>
Mon, 18 Mar 2013 09:18:25 +0000 (11:18 +0200)
No functional change. otg_set_vbus is already protected so removed the
check before calling otg_set_vbus.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/omap2430.c

index e7b5eae5a141a7ff08bd3d8a44633559b1efbe1f..018373d1c2c4f1f3d005a3eed946f437645b529b 100644 (file)
@@ -174,8 +174,7 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on)
                                }
                        }
 
-                       if (otg->set_vbus)
-                               otg_set_vbus(otg, 1);
+                       otg_set_vbus(otg, 1);
                } else {
                        musb->is_active = 1;
                        otg->default_a = 1;
@@ -296,10 +295,9 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
                        pm_runtime_put_autosuspend(dev);
                }
 
-               if (data->interface_type == MUSB_INTERFACE_UTMI) {
-                       if (musb->xceiv->otg->set_vbus)
-                               otg_set_vbus(musb->xceiv->otg, 0);
-               }
+               if (data->interface_type == MUSB_INTERFACE_UTMI)
+                       otg_set_vbus(musb->xceiv->otg, 0);
+
                omap_control_usb_set_mode(glue->control_otghs,
                        USB_MODE_DISCONNECT);
                break;