Skip to content

Commit f0447a6

Browse files
Govindraj.RSamuel Ortiz
authored andcommitted
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>
1 parent cbb8c22 commit f0447a6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/mfd/omap-usb-host.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,14 +799,13 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
799799

800800
platform_set_drvdata(pdev, omap);
801801

802+
omap_usbhs_init(dev);
802803
ret = omap_usbhs_alloc_children(pdev);
803804
if (ret) {
804805
dev_err(dev, "omap_usbhs_alloc_children failed\n");
805806
goto err_alloc;
806807
}
807808

808-
omap_usbhs_init(dev);
809-
810809
goto end_probe;
811810

812811
err_alloc:

0 commit comments

Comments
 (0)