On Fri, Jul 19 2013, Andrzej Pietrasiewicz wrote:
> fsg_common_init is a lengthy function. Now there are helper functions
> which cover all parts of it. Use them.
>
> Signed-off-by: Andrzej Pietrasiewicz <andrze...@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.p...@samsung.com>

Acked-by: Michal Nazarewicz <min...@mina86.com>

> ---
>  drivers/usb/gadget/f_mass_storage.c |   14 +++-----------
>  1 files changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/usb/gadget/f_mass_storage.c 
> b/drivers/usb/gadget/f_mass_storage.c
> index 94b7bc3..ba24236 100644
> --- a/drivers/usb/gadget/f_mass_storage.c
> +++ b/drivers/usb/gadget/f_mass_storage.c
> @@ -3033,21 +3033,13 @@ struct fsg_common *fsg_common_init(struct fsg_common 
> *common,
>  
>       fsg_common_set_inquiry_string(common, cfg->vendor_name,
>                                     cfg->product_name);
> -     /* Tell the thread to start working */
> -     common->thread_task =
> -             kthread_create(fsg_main_thread, common, "file-storage");
> -     if (IS_ERR(common->thread_task)) {
> -             rc = PTR_ERR(common->thread_task);
> -             goto error_release;
> -     }
>  
>       /* Information */
>       INFO(common, FSG_DRIVER_DESC ", version: " FSG_DRIVER_VERSION "\n");
> -     INFO(common, "Number of LUNs=%d\n", common->nluns);
>  
> -     DBG(common, "I/O thread pid: %d\n", task_pid_nr(common->thread_task));
> -
> -     wake_up_process(common->thread_task);
> +     rc = fsg_common_run_thread(common);
> +     if (rc)
> +             goto error_release;
>  
>       return common;
>  
> -- 
> 1.7.0.4
>

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: m...@google.com>--------------ooO--(_)--Ooo--

Attachment: signature.asc
Description: PGP signature

Reply via email to