]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/otg/isp1301_omap.c
Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[karo-tx-linux.git] / drivers / usb / otg / isp1301_omap.c
index 512397a9880343ee5455cc62dfa8b65aba0d6e9a..7a88667742b663dc64f627560dfc5d34af32d0a7 100644 (file)
@@ -36,9 +36,9 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/usb.h>
 #include <plat/mux.h>
 
+#include <mach/usb.h>
 
 #ifndef        DEBUG
 #undef VERBOSE
@@ -1336,9 +1336,6 @@ static int
 isp1301_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget)
 {
        struct isp1301  *isp = container_of(otg->phy, struct isp1301, phy);
-#ifndef        CONFIG_USB_OTG
-       u32 l;
-#endif
 
        if (!otg || isp != the_transceiver)
                return -ENODEV;
@@ -1365,10 +1362,14 @@ isp1301_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget)
        otg->gadget = gadget;
        // FIXME update its refcount
 
-       l = omap_readl(OTG_CTRL) & OTG_CTRL_MASK;
-       l &= ~(OTG_XCEIV_OUTPUTS|OTG_CTRL_BITS);
-       l |= OTG_ID;
-       omap_writel(l, OTG_CTRL);
+       {
+               u32 l;
+
+               l = omap_readl(OTG_CTRL) & OTG_CTRL_MASK;
+               l &= ~(OTG_XCEIV_OUTPUTS|OTG_CTRL_BITS);
+               l |= OTG_ID;
+               omap_writel(l, OTG_CTRL);
+       }
 
        power_up(isp);
        isp->phy.state = OTG_STATE_B_IDLE;
@@ -1609,7 +1610,7 @@ isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
        dev_dbg(&i2c->dev, "scheduled timer, %d min\n", TIMER_MINUTES);
 #endif
 
-       status = usb_set_transceiver(&isp->phy);
+       status = usb_add_phy(&isp->phy, USB_PHY_TYPE_USB2);
        if (status < 0)
                dev_err(&i2c->dev, "can't register transceiver, %d\n",
                        status);
@@ -1648,7 +1649,7 @@ subsys_initcall(isp_init);
 static void __exit isp_exit(void)
 {
        if (the_transceiver)
-               usb_set_transceiver(NULL);
+               usb_remove_phy(&the_transceiver->phy);
        i2c_del_driver(&isp1301_driver);
 }
 module_exit(isp_exit);