Hi,

On 08/26/2014 06:20 PM, dingu...@opensource.altera.com wrote:
> From: Dinh Nguyen <dingu...@opensource.altera.com>
> 
> Move spin_lock_init to common location for both host and gadget.
> 
> Signed-off-by: Dinh Nguyen <dingu...@opensource.altera.com>
> ---
> v4: move spin_lock_init up to make sure sure no locks can be taken before
>     the init.
> ---
>  drivers/usb/dwc2/hcd.c      | 1 -
>  drivers/usb/dwc2/platform.c | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index 07a7bcd..c6778d9 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -2824,7 +2824,6 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq,
>  
>       hcd->has_tt = 1;
>  
> -     spin_lock_init(&hsotg->lock);
>       ((struct wrapper_priv_data *) &hcd->hcd_priv)->hsotg = hsotg;
>       hsotg->priv = hcd;
>  
> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> index 2871f351..278135d 100644
> --- a/drivers/usb/dwc2/platform.c
> +++ b/drivers/usb/dwc2/platform.c
> @@ -183,6 +183,7 @@ static int dwc2_driver_probe(struct platform_device *dev)
>  
>       hsotg->dr_mode = of_usb_get_dr_mode(dev->dev.of_node);
>  
> +     spin_lock_init(&hsotg->lock);
>       if (IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)) {
>               retval = dwc2_gadget_init(hsotg, irq);
>               if (retval)
> 

This change should be done in patch "usb: dwc2: Add the appropriate init
calls in platform code". You should squash these two patches.

Best regards
Robert Baldyga
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to