]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/phy/phy-omap-usb2.c
usb: move the OTG state from the USB PHY to the OTG structure
[karo-tx-linux.git] / drivers / phy / phy-omap-usb2.c
index 8c842980834a2cebb40a77d31bc30f5f6ed643ae..9f4093590f4c9d0979522de4f119563411d7cfa3 100644 (file)
@@ -80,11 +80,9 @@ static int omap_usb_start_srp(struct usb_otg *otg)
 
 static int omap_usb_set_host(struct usb_otg *otg, struct usb_bus *host)
 {
-       struct usb_phy  *phy = otg->phy;
-
        otg->host = host;
        if (!host)
-               phy->state = OTG_STATE_UNDEFINED;
+               otg->state = OTG_STATE_UNDEFINED;
 
        return 0;
 }
@@ -92,11 +90,9 @@ static int omap_usb_set_host(struct usb_otg *otg, struct usb_bus *host)
 static int omap_usb_set_peripheral(struct usb_otg *otg,
                struct usb_gadget *gadget)
 {
-       struct usb_phy  *phy = otg->phy;
-
        otg->gadget = gadget;
        if (!gadget)
-               phy->state = OTG_STATE_UNDEFINED;
+               otg->state = OTG_STATE_UNDEFINED;
 
        return 0;
 }