From: Govindraj.R Date: Wed, 15 Feb 2012 10:23:34 +0000 (+0530) Subject: mfd: Move omap-usb-host usbhs init before allocing child dev X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f0447a690e2cfe005a605253cf6bdfa9b9fd5d6e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mfd: Move omap-usb-host usbhs init before allocing child dev There could be possible race condition where the host dev's are alloced and added to platform dev just before usbhs_init. Just move usbhs_init before adding child dev. CC: Alan Stern Signed-off-by: Govindraj.R Acked-by: Felipe Balbi Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 680041189c41..95a2e546a489 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -799,14 +799,13 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev) platform_set_drvdata(pdev, omap); + omap_usbhs_init(dev); ret = omap_usbhs_alloc_children(pdev); if (ret) { dev_err(dev, "omap_usbhs_alloc_children failed\n"); goto err_alloc; } - omap_usbhs_init(dev); - goto end_probe; err_alloc: