Re: [PATCH 2/2] mfd: omap-usb-host: Move usbhs init before allocing child dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 15, 2012 at 03:53:34PM +0530, Govindraj.R wrote:
> From: "Govindraj.R" <govindraj.raja@xxxxxx>
> 
> 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: Felipe Balbi <balbi@xxxxxx>

Acked-by: Felipe Balbi <balbi@xxxxxx>

> CC: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Govindraj.R <govindraj.raja@xxxxxx>
> ---
>  drivers/mfd/omap-usb-host.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> index 3109b0a..c5d48ce 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:
> -- 
> 1.7.5.4
> 

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux