aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/omap-usb-host.c
diff options
context:
space:
mode:
authorGovindraj.R <govindraj.raja@ti.com>2012-02-15 05:23:34 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-03-06 12:46:45 -0500
commitf0447a690e2cfe005a605253cf6bdfa9b9fd5d6e (patch)
tree02b4c30c47fc239fbf870abd00dc0ab74f944b00 /drivers/mfd/omap-usb-host.c
parentcbb8c220e70d25d1108db39d7956b08a66492fad (diff)
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 <stern@rowland.harvard.edu> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/omap-usb-host.c')
-rw-r--r--drivers/mfd/omap-usb-host.c3
1 files changed, 1 insertions, 2 deletions
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)
799 799
800 platform_set_drvdata(pdev, omap); 800 platform_set_drvdata(pdev, omap);
801 801
802 omap_usbhs_init(dev);
802 ret = omap_usbhs_alloc_children(pdev); 803 ret = omap_usbhs_alloc_children(pdev);
803 if (ret) { 804 if (ret) {
804 dev_err(dev, "omap_usbhs_alloc_children failed\n"); 805 dev_err(dev, "omap_usbhs_alloc_children failed\n");
805 goto err_alloc; 806 goto err_alloc;
806 } 807 }
807 808
808 omap_usbhs_init(dev);
809
810 goto end_probe; 809 goto end_probe;
811 810
812err_alloc: 811err_alloc: