Skip to content

Commit

Permalink
mfd: Move omap-usb-host usbhs init before allocing child dev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Govindraj.R authored and Samuel Ortiz committed Mar 6, 2012
1 parent cbb8c22 commit f0447a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mfd/omap-usb-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f0447a6

Please sign in to comment.