Merge remote-tracking branch 'asoc/fix/rt286' into asoc-linus
[sfrench/cifs-2.6.git] / drivers / usb / musb / musb_host.c
index ac3a4952abb4b290b019ac59fbddd7004b50d949..dbe617a735d8400576e53a84e488ea4ff9fc8466 100644 (file)
@@ -2780,10 +2780,11 @@ int musb_host_setup(struct musb *musb, int power_budget)
        int ret;
        struct usb_hcd *hcd = musb->hcd;
 
-       MUSB_HST_MODE(musb);
-       musb->xceiv->otg->default_a = 1;
-       musb->xceiv->otg->state = OTG_STATE_A_IDLE;
-
+       if (musb->port_mode == MUSB_PORT_MODE_HOST) {
+               MUSB_HST_MODE(musb);
+               musb->xceiv->otg->default_a = 1;
+               musb->xceiv->otg->state = OTG_STATE_A_IDLE;
+       }
        otg_set_host(musb->xceiv->otg, &hcd->self);
        hcd->self.otg_port = 1;
        musb->xceiv->otg->host = &hcd->self;