On 08/24/2012 08:51 AM, Richard Zhao wrote: > On Thu, Aug 23, 2012 at 07:22:54PM +0200, Marc Kleine-Budde wrote: >> This patch registers the msx-phy as an USB_PHY_TYPE_USB2. This is needed to get >> reference to the phy with devm_usb_get_phy_by_phandle(), which will be added in >> a later patch. >> >> Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> >> --- >> drivers/usb/otg/mxs-phy.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c >> index c1a67cb..240b945 100644 >> --- a/drivers/usb/otg/mxs-phy.c >> +++ b/drivers/usb/otg/mxs-phy.c >> @@ -141,11 +141,14 @@ static int mxs_phy_probe(struct platform_device *pdev) >> >> platform_set_drvdata(pdev, &mxs_phy->phy); >> >> - return 0; >> + return usb_add_phy(&mxs_phy->phy, USB_PHY_TYPE_USB2); > Why is it usb2? It's kind of USB_PHY_TYPE_DT. For now there is USB_PHY_TYPE_USB2, USB_PHY_TYPE_USB3 and undefined. On the one hand it's an USB2 type phy on the other the type is not relevant if you get the phy by a phandle. I think it should be USB2. Kishon, what do you think? >> } >> >> static int __devexit mxs_phy_remove(struct platform_device *pdev) >> { >> + struct mxs_phy *mxs_phy = platform_get_drvdata(pdev); > drvdata is usb_phy. Right, will fix. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature