mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] usb: phy: phy-mxs-usb: set the correct platform drvdata
@ 2013-11-07  2:55 Jisheng Zhang
  2013-11-07  6:49 ` Peter Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Jisheng Zhang @ 2013-11-07  2:55 UTC (permalink / raw)
  To: balbi, gregkh; +Cc: linux-usb, linux-kernel, shawn.guo, Jisheng Zhang

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 <jszhang@marvell.com>
---
 drivers/usb/phy/phy-mxs-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index fdd33b4..545844b 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@ -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)
-- 
1.8.4.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH v2] usb: phy: phy-mxs-usb: set the correct platform drvdata
  2013-11-07  2:55 [PATCH v2] usb: phy: phy-mxs-usb: set the correct platform drvdata Jisheng Zhang
@ 2013-11-07  6:49 ` Peter Chen
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen @ 2013-11-07  6:49 UTC (permalink / raw)
  To: Jisheng Zhang, balbi, gregkh; +Cc: linux-usb, linux-kernel, shawn.guo

 
> 
> Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> ---
>  drivers/usb/phy/phy-mxs-usb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-
> usb.c
> index fdd33b4..545844b 100644
> --- a/drivers/usb/phy/phy-mxs-usb.c
> +++ b/drivers/usb/phy/phy-mxs-usb.c
> @@ -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 <peter.chen@freescale.com> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-07  6:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-07  2:55 [PATCH v2] usb: phy: phy-mxs-usb: set the correct platform drvdata Jisheng Zhang
2013-11-07  6:49 ` Peter Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®