]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/musb/musb_host.c
usb: move the OTG state from the USB PHY to the OTG structure
[karo-tx-linux.git] / drivers / usb / musb / musb_host.c
index 855793d701bbb958a17a5c638bc22a68da10558b..23d474d3d7f466188bcf4cee8c8f974e4274d22f 100644 (file)
@@ -2463,7 +2463,7 @@ static int musb_bus_suspend(struct usb_hcd *hcd)
        if (!is_host_active(musb))
                return 0;
 
-       switch (musb->xceiv->state) {
+       switch (musb->xceiv->otg->state) {
        case OTG_STATE_A_SUSPEND:
                return 0;
        case OTG_STATE_A_WAIT_VRISE:
@@ -2473,7 +2473,7 @@ static int musb_bus_suspend(struct usb_hcd *hcd)
                 */
                devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
                if ((devctl & MUSB_DEVCTL_VBUS) == MUSB_DEVCTL_VBUS)
-                       musb->xceiv->state = OTG_STATE_A_WAIT_BCON;
+                       musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON;
                break;
        default:
                break;
@@ -2481,7 +2481,7 @@ static int musb_bus_suspend(struct usb_hcd *hcd)
 
        if (musb->is_active) {
                WARNING("trying to suspend as %s while active\n",
-                               usb_otg_state_string(musb->xceiv->state));
+                               usb_otg_state_string(musb->xceiv->otg->state));
                return -EBUSY;
        } else
                return 0;
@@ -2678,7 +2678,7 @@ int musb_host_setup(struct musb *musb, int power_budget)
 
        MUSB_HST_MODE(musb);
        musb->xceiv->otg->default_a = 1;
-       musb->xceiv->state = OTG_STATE_A_IDLE;
+       musb->xceiv->otg->state = OTG_STATE_A_IDLE;
 
        otg_set_host(musb->xceiv->otg, &hcd->self);
        hcd->self.otg_port = 1;