From: Lothar Waßmann Date: Thu, 17 Jul 2014 10:49:41 +0000 (+0200) Subject: usb: phy: am335x: setup the gen_phy function pointers _before_ adding the phy X-Git-Tag: KARO-TX-2014-08-29~14 X-Git-Url: https://git.karo-electronics.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=f3e40550449cf3e2c741f251f1ce3298ff20237e usb: phy: am335x: setup the gen_phy function pointers _before_ adding the phy --- diff --git a/drivers/usb/phy/phy-am335x.c b/drivers/usb/phy/phy-am335x.c index 276a9a09ada8..4b74882f71d7 100644 --- a/drivers/usb/phy/phy-am335x.c +++ b/drivers/usb/phy/phy-am335x.c @@ -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);