aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2015-08-06 09:09:54 -0400
committerPeter Chen <peter.chen@freescale.com>2015-08-13 21:13:13 -0400
commitef12da914ed696745b495bea22aea137e88cffb6 (patch)
tree42e8385c0436cd868fa4f5963bb9ce9d9b67fee5 /drivers/usb/chipidea
parentbc24937943d9f71a1e32b5dc4e2f0ef8fcc07b64 (diff)
usb: chipidea: imx: properly check for usbmisc
If usbmisc hasn't probed yet, defer the probe. It's not enough to check if the platform device for the OF node of the usbmisc has been registered, but it also needs to have been probed already before we can call imx_usbmisc_init(). This can happen if the order in which devices are probed change due to async probing or on-demand probing of dependencies. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/ci_hdrc_imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index 6d2a85a8bdcf..9ccae5a33147 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -104,7 +104,7 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev)
104 misc_pdev = of_find_device_by_node(args.np); 104 misc_pdev = of_find_device_by_node(args.np);
105 of_node_put(args.np); 105 of_node_put(args.np);
106 106
107 if (!misc_pdev) 107 if (!misc_pdev || !platform_get_drvdata(misc_pdev))
108 return ERR_PTR(-EPROBE_DEFER); 108 return ERR_PTR(-EPROBE_DEFER);
109 109
110 data->dev = &misc_pdev->dev; 110 data->dev = &misc_pdev->dev;