aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/file_storage.c
diff options
context:
space:
mode:
authorMichal Nazarewicz <m.nazarewicz@samsung.com>2010-08-12 11:43:50 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 13:21:22 -0400
commit452ee0eb10bd3581cf667a1db18cb684889ce446 (patch)
tree17e4858de0ffad8a72c1445741e45155aa034922 /drivers/usb/gadget/file_storage.c
parentba0534be935d7b24e5fdd6f82c443ee75abc9149 (diff)
usb: gadget: storage: remove nofua file when unbinding
The dev_attr_nofua file was created during fsg_bind() but was never removed. Made it a bit more symmetrical and added code to remove the file in fsg_unbind(). Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Acked-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/file_storage.c')
-rw-r--r--drivers/usb/gadget/file_storage.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index a857b7ac238c..ab77792a4361 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -3178,6 +3178,7 @@ static void /* __init_or_exit */ fsg_unbind(struct usb_gadget *gadget)
3178 for (i = 0; i < fsg->nluns; ++i) { 3178 for (i = 0; i < fsg->nluns; ++i) {
3179 curlun = &fsg->luns[i]; 3179 curlun = &fsg->luns[i];
3180 if (curlun->registered) { 3180 if (curlun->registered) {
3181 device_remove_file(&curlun->dev, &dev_attr_nofua);
3181 device_remove_file(&curlun->dev, &dev_attr_ro); 3182 device_remove_file(&curlun->dev, &dev_attr_ro);
3182 device_remove_file(&curlun->dev, &dev_attr_file); 3183 device_remove_file(&curlun->dev, &dev_attr_file);
3183 fsg_lun_close(curlun); 3184 fsg_lun_close(curlun);