summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/legacy/mass_storage.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/mass_storage.c
parent5542f58c95aef67bc9016855f7c0bd6117b43100 (diff)
downloadlinux-dd02ea5a33059e4a753ae8bb877b698c54ee2907.tar.bz2
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/mass_storage.c')
-rw-r--r--drivers/usb/gadget/legacy/mass_storage.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/usb/gadget/legacy/mass_storage.c b/drivers/usb/gadget/legacy/mass_storage.c
index ab1a42ce75d2..bda3c519110f 100644
--- a/drivers/usb/gadget/legacy/mass_storage.c
+++ b/drivers/usb/gadget/legacy/mass_storage.c
@@ -177,10 +177,6 @@ static int msg_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;
-
fsg_common_set_ops(opts->common, &ops);
status = fsg_common_set_cdev(opts->common, cdev, config.can_stall);
@@ -227,8 +223,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);