]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/musb/da8xx.c
usb: musb: fix dependency on transceiver driver
[karo-tx-linux.git] / drivers / usb / musb / da8xx.c
index 97996af2646eae9a2950e857652873186aea57c9..7c71769d71ff37370e6e8bf23be5c837bd72a677 100644 (file)
@@ -410,6 +410,7 @@ static int da8xx_musb_init(struct musb *musb)
 {
        void __iomem *reg_base = musb->ctrl_base;
        u32 rev;
+       int ret = -ENODEV;
 
        musb->mregs += DA8XX_MENTOR_CORE_OFFSET;
 
@@ -420,8 +421,10 @@ static int da8xx_musb_init(struct musb *musb)
 
        usb_nop_xceiv_register();
        musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
-       if (IS_ERR_OR_NULL(musb->xceiv))
+       if (IS_ERR_OR_NULL(musb->xceiv)) {
+               ret = -EPROBE_DEFER;
                goto fail;
+       }
 
        setup_timer(&otg_workaround, otg_timer, (unsigned long)musb);
 
@@ -441,7 +444,7 @@ static int da8xx_musb_init(struct musb *musb)
        musb->isr = da8xx_musb_interrupt;
        return 0;
 fail:
-       return -ENODEV;
+       return ret;
 }
 
 static int da8xx_musb_exit(struct musb *musb)