diff options
author | Michal Nazarewicz <m.nazarewicz@samsung.com> | 2010-08-13 17:16:22 +0530 |
---|---|---|
committer | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2010-08-13 17:16:22 +0530 |
commit | 17e4432d88bc136c9c810aa5f57e023d4979c4a1 (patch) | |
tree | 78da3b80bca634da5af8153065333d2fd464bf2b /drivers | |
parent | 00359f58051e22d96ad0ae4c5fa5aed854e905e3 (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().
[Anand G] This patch was posted to linux-usb by Michal [1].
It is a valid fix, yet to be queued up for mainline.
[1] <http://marc.info/?l=linux-usb&m=128162788218265&w=2>
Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Acked-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 1 |
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) for (i = 0; i < fsg->nluns; ++i) { curlun = &fsg->luns[i]; if (curlun->registered) { + device_remove_file(&curlun->dev, &dev_attr_nofua); device_remove_file(&curlun->dev, &dev_attr_ro); device_remove_file(&curlun->dev, &dev_attr_file); fsg_lun_close(curlun); |