提交 452ee0eb 编写于 作者: M Michal Nazarewicz 提交者: Greg Kroah-Hartman

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: NMichal Nazarewicz <m.nazarewicz@samsung.com>
Acked-by: NAndy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 ba0534be
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册