summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/core.c
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@free-electrons.com>2014-11-26 13:44:35 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-01-15 21:19:07 -0600
commit6c95bb00d2473643938054b85f35e6a4d4676ab8 (patch)
tree03a41a569a4df6a270c740bc1d5f6bf6c83186b0 /drivers/usb/chipidea/core.c
parent447d780e856fdca49ba4801e498c0f18e71d1b92 (diff)
usb: chipidea: fix phy handling
The generic plaftorm device for ChipIdea drivers is probed by calling ci_hdrc_probe. The device structure used is not the one of the specific ChipIdea driver but the one of the generic ChipIdea platform device. This results in not being able to probe the PHYs as we're not using the right device structure. Since all ChipIdea drivers are retrieving their PHYs in their specific driver code, this didn't impact any of them yet. Fixes it using the right device structure (dev->parent). Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 21a5b579cb63364b90e545e7e0a4bccb027711e8)
Diffstat (limited to 'drivers/usb/chipidea/core.c')
-rw-r--r--drivers/usb/chipidea/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index e43be34f04b9..ea3d8caf8be3 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -685,8 +685,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
} else if (ci->platdata->usb_phy) {
ci->usb_phy = ci->platdata->usb_phy;
} else {
- ci->phy = devm_phy_get(dev, "usb-phy");
- ci->usb_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
+ ci->phy = devm_phy_get(dev->parent, "usb-phy");
+ ci->usb_phy = devm_usb_get_phy(dev->parent, USB_PHY_TYPE_USB2);
/* if both generic PHY and USB PHY layers aren't enabled */
if (PTR_ERR(ci->phy) == -ENOSYS &&