usb: phy: phy-mxs-usb: set the correct platform drvdata
Subsystems (2)
PATCH v2 1/1 usb: phy: phy-mxs-usb: set the correct platform drvdata
We need to set mxs_phy rather as the platform drvdata so that we can get the correct mxs_phy in mxs_phy_remove().
Signed-off-by Jisheng Zhang <[email protected]>
--- drivers/usb/phy/phy-mxs-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/phy/phy-mxs-usb.c +1 -1
@@ -164,7 +164,7 @@ static int mxs_phy_probe(struct platform_device *pdev) mxs_phy->clk = clk; -platform_set_drvdata (pdev, &mxs_phy->phy); +platform_set_drvdata (pdev, mxs_phy); ret =usb_add_phy_dev (&mxs_phy->phy);if (ret)
Signature · 1 line
1.8.4.2
Quoted 13 lines
Signed-off-by Jisheng Zhang <[email protected]>--- drivers/usb/phy/phy-mxs-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/phy/phy-mxs- renamed from drivers/usb/phy/phy-mxs-usb.c +0
-0
usb.c
index fdd33b4..545844b 100644
drivers/usb/phy/phy-mxs-usb.c static int mxs_phy_probe(struct platform_device *pdev)
Quoted 9 lines
drivers/usb/phy/phy-mxs-usb.c +1
-2@@ -164,7 +164,7 @@ static int mxs_phy_probe(struct platform_device *pdev) mxs_phy->clk = clk; -platform_set_drvdata (pdev, &mxs_phy->phy); +platform_set_drvdata (pdev, mxs_phy); ret =usb_add_phy_dev (&mxs_phy->phy);if (ret) --
It is so unlucky the struct usb_phy phy is the first element of struct mxs_phy, so we haven't run any problems.
Jisheng, thanks for fixing it.
Acked-by Peter Chen <[email protected]>