]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: phy: am335x: setup the gen_phy function pointers _before_ adding the phy
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 17 Jul 2014 10:49:41 +0000 (12:49 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 17 Jul 2014 12:57:56 +0000 (14:57 +0200)
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);