Merge tag 'xceiv-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
[firefly-linux-kernel-4.4.55.git] / drivers / usb / musb / da8xx.c
index 01c8f2ece0847c4c3c9e52c858d8d7b3fd7ae011..8bd9566f3fbb0dc35968fe5b83d3be219662a730 100644 (file)
@@ -294,6 +294,7 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci)
 {
        struct musb             *musb = hci;
        void __iomem            *reg_base = musb->ctrl_base;
+       struct usb_otg          *otg = musb->xceiv->otg;
        unsigned long           flags;
        irqreturn_t             ret = IRQ_NONE;
        u32                     status;
@@ -351,14 +352,14 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci)
                        WARNING("VBUS error workaround (delay coming)\n");
                } else if (is_host_enabled(musb) && drvvbus) {
                        MUSB_HST_MODE(musb);
-                       musb->xceiv->default_a = 1;
+                       otg->default_a = 1;
                        musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
                        portstate(musb->port1_status |= USB_PORT_STAT_POWER);
                        del_timer(&otg_workaround);
                } else {
                        musb->is_active = 0;
                        MUSB_DEV_MODE(musb);
-                       musb->xceiv->default_a = 0;
+                       otg->default_a = 0;
                        musb->xceiv->state = OTG_STATE_B_IDLE;
                        portstate(musb->port1_status &= ~USB_PORT_STAT_POWER);
                }
@@ -424,7 +425,7 @@ static int da8xx_musb_init(struct musb *musb)
                goto fail;
 
        usb_nop_xceiv_register();
-       musb->xceiv = otg_get_transceiver();
+       musb->xceiv = usb_get_transceiver();
        if (!musb->xceiv)
                goto fail;
 
@@ -457,7 +458,7 @@ static int da8xx_musb_exit(struct musb *musb)
 
        phy_off();
 
-       otg_put_transceiver(musb->xceiv);
+       usb_put_transceiver(musb->xceiv);
        usb_nop_xceiv_unregister();
 
        return 0;