Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 452ee0eb authored by Michal Nazarewicz's avatar Michal Nazarewicz Committed by Greg Kroah-Hartman
Browse files

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: default avatarMichal Nazarewicz <m.nazarewicz@samsung.com>
Acked-by: default avatarAndy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ba0534be
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);