aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/legacy/multi.c
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2015-07-31 13:46:07 +0200
committerFelipe Balbi <balbi@ti.com>2015-07-31 09:01:19 -0500
commitdd02ea5a33059e4a753ae8bb877b698c54ee2907 (patch)
treeda31ce46795d007f422546cc930ffe5f4a136d23 /drivers/usb/gadget/legacy/multi.c
parent5542f58c95aef67bc9016855f7c0bd6117b43100 (diff)
downloadlinux-dd02ea5a33059e4a753ae8bb877b698c54ee2907.tar.gz
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>
Diffstat (limited to 'drivers/usb/gadget/legacy/multi.c')
-rw-r--r--drivers/usb/gadget/legacy/multi.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/usb/gadget/legacy/multi.c b/drivers/usb/gadget/legacy/multi.c
index c38ead1d67a4..4fe794ddcd49 100644
--- a/drivers/usb/gadget/legacy/multi.c
+++ b/drivers/usb/gadget/legacy/multi.c
@@ -393,10 +393,6 @@ static int __ref multi_bind(struct usb_composite_dev *cdev)
if (status)
goto fail2;
- status = fsg_common_set_nluns(fsg_opts->common, config.nluns);
- if (status)
- goto fail_set_nluns;
-
status = fsg_common_set_cdev(fsg_opts->common, cdev, config.can_stall);
if (status)
goto fail_set_cdev;
@@ -448,8 +444,6 @@ fail_otg_desc:
fail_string_ids:
fsg_common_remove_luns(fsg_opts->common);
fail_set_cdev:
- fsg_common_free_luns(fsg_opts->common);
-fail_set_nluns:
fsg_common_free_buffers(fsg_opts->common);
fail2:
usb_put_function_instance(fi_msg);