summaryrefslogtreecommitdiff
path: root/drivers/usb/phy/phy-fsl-usb.c
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2013-05-10 09:45:08 (GMT)
committerFelipe Balbi <balbi@ti.com>2013-05-15 14:32:47 (GMT)
commit1abd8b3172b701ed626df4ebf09b7fe7f329888a (patch)
treee5edc969a6f01954507c3cf7224efa64e6f52f0d /drivers/usb/phy/phy-fsl-usb.c
parent9d6ab420a9cb475fb99874f06d00df9c8259c973 (diff)
downloadlinux-fsl-qoriq-1abd8b3172b701ed626df4ebf09b7fe7f329888a.tar.xz
usb: phy: Fix NULL pointer exception during usb_get_phy
Upon initialisation (driver probe) a NULL pointer exception is triggered. This is due to lack of initialisation of device field in phy structure, which is used by phy framework in usb_get_phy(). Fix it by initialising the device field. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-fsl-usb.c')
-rw-r--r--drivers/usb/phy/phy-fsl-usb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c
index 97b9308..e771baf 100644
--- a/drivers/usb/phy/phy-fsl-usb.c
+++ b/drivers/usb/phy/phy-fsl-usb.c
@@ -799,6 +799,7 @@ static int fsl_otg_conf(struct platform_device *pdev)
/* initialize the otg structure */
fsl_otg_tc->phy.label = DRIVER_DESC;
+ fsl_otg_tc->phy.dev = &pdev->dev;
fsl_otg_tc->phy.set_power = fsl_otg_set_power;
fsl_otg_tc->phy.otg->phy = &fsl_otg_tc->phy;