]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/phy/phy-am335x.c
usb: phy: am335x: setup the gen_phy function pointers _before_ adding the phy
[karo-tx-linux.git] / drivers / usb / phy / phy-am335x.c
index 276a9a09ada8ba8313377216c0f043c47de20f97..4b74882f71d7b639cd9cc839544b2d915e88158d 100644 (file)
@@ -56,11 +56,12 @@ static int am335x_phy_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
+       am_phy->usb_phy_gen.phy.init = am335x_init;
+       am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown;
+
        ret = usb_add_phy_dev(&am_phy->usb_phy_gen.phy);
        if (ret)
                return ret;
-       am_phy->usb_phy_gen.phy.init = am335x_init;
-       am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown;
 
        platform_set_drvdata(pdev, am_phy);
        device_init_wakeup(dev, true);