]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/phy/phy-generic.c
usb: move the OTG state from the USB PHY to the OTG structure
[karo-tx-linux.git] / drivers / usb / phy / phy-generic.c
index 7594e5069ae59d2f621054ff7f6cd7331022f5a2..280a3458ff6bdb1157ba45bdd9e55f65c1467593 100644 (file)
@@ -123,7 +123,7 @@ static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget)
        }
 
        otg->gadget = gadget;
-       otg->phy->state = OTG_STATE_B_IDLE;
+       otg->state = OTG_STATE_B_IDLE;
        return 0;
 }
 
@@ -225,9 +225,9 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
        nop->phy.dev            = nop->dev;
        nop->phy.label          = "nop-xceiv";
        nop->phy.set_suspend    = nop_set_suspend;
-       nop->phy.state          = OTG_STATE_UNDEFINED;
        nop->phy.type           = type;
 
+       nop->phy.otg->state             = OTG_STATE_UNDEFINED;
        nop->phy.otg->phy               = &nop->phy;
        nop->phy.otg->set_host          = nop_set_host;
        nop->phy.otg->set_peripheral    = nop_set_peripheral;