diff options
author | Michal Nazarewicz <m.nazarewicz@samsung.com> | 2010-08-12 17:43:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 10:21:22 -0700 |
commit | 452ee0eb10bd3581cf667a1db18cb684889ce446 (patch) | |
tree | 17e4858de0ffad8a72c1445741e45155aa034922 /drivers | |
parent | ba0534be935d7b24e5fdd6f82c443ee75abc9149 (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')
-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); |