usb: gadget: mass_storage: Use static array for luns
This patch replace dynamicly allocated luns array with static one. This simplifies the code of mass storage function and modules. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com>
This commit is contained in:

committed by
Felipe Balbi

parent
5542f58c95
commit
dd02ea5a33
@@ -186,10 +186,6 @@ static int acm_ms_bind(struct usb_composite_dev *cdev)
|
||||
if (status)
|
||||
goto fail;
|
||||
|
||||
status = fsg_common_set_nluns(opts->common, config.nluns);
|
||||
if (status)
|
||||
goto fail_set_nluns;
|
||||
|
||||
status = fsg_common_set_cdev(opts->common, cdev, config.can_stall);
|
||||
if (status)
|
||||
goto fail_set_cdev;
|
||||
@@ -239,8 +235,6 @@ fail_otg_desc:
|
||||
fail_string_ids:
|
||||
fsg_common_remove_luns(opts->common);
|
||||
fail_set_cdev:
|
||||
fsg_common_free_luns(opts->common);
|
||||
fail_set_nluns:
|
||||
fsg_common_free_buffers(opts->common);
|
||||
fail:
|
||||
usb_put_function_instance(fi_msg);
|
||||
|
Reference in New Issue
Block a user