lkml.org 
[lkml]   [2014]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 7/9] usb: phy: am335x: setup the gen_phy function pointers _before_ adding the phy
Date
Make sure all parameters are correctly set up before registering the
PHY with the USB framework.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
drivers/usb/phy/phy-am335x.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/phy/phy-am335x.c b/drivers/usb/phy/phy-am335x.c
index 91c71ab..6522fa7 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);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-07-18 13:41    [W:0.210 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site