Re: [PATCH 2/2] usb: gadget: f_mass_storage: defer storage thread wakeup

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

 



On Fri, Jun 05 2015, Sanjay Singh Rawat wrote:
> As the bind configuration is not complete during thread
> creation, defering the thread wake to end of bind.
>
> Signed-off-by: Sanjay Singh Rawat <snjsrwt@xxxxxxxxx>
> ---
>  drivers/usb/gadget/function/f_mass_storage.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
> index 0e90e38..a996f3f 100644
> --- a/drivers/usb/gadget/function/f_mass_storage.c
> +++ b/drivers/usb/gadget/function/f_mass_storage.c
> @@ -3013,8 +3013,6 @@ int fsg_common_run_thread(struct fsg_common *common)
>  
>  	DBG(common, "I/O thread pid: %d\n", task_pid_nr(common->thread_task));
>  
> -	wake_up_process(common->thread_task);
> -
>  	return 0;
>  }

This will unfortunately break other users of the function, namely those
in drivers/usb/gadget/legacy directory.  They will need to be updated as
well.

>  EXPORT_SYMBOL_GPL(fsg_common_run_thread);
> @@ -3121,6 +3119,9 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
>  	if (ret)
>  		goto autoconf_fail;
>  
> +	/* wakeup the thread */
> +	wake_up_process(fsg->common->thread_task);
> +
>  	return 0;
>  
>  autoconf_fail:
> -- 
> 1.8.3.2
>

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@xxxxxxxxxx>--<xmpp:mina86@xxxxxxxxxx>--ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux