Re: [PATCHv7 7/8] usb: gadget: storage: remove nofua file when unbinding

From: Andy Shevchenko
Date: Thu Aug 12 2010 - 07:32:31 EST


On Mon, Aug 9, 2010 at 6:02 PM, Michal Nazarewicz
<m.nazarewicz@xxxxxxxxxxx> wrote:
> 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@xxxxxxxxxxx>
> Cc: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx>
> ---
> Â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 a857b7a..ab77792 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);
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
>

Acked-by: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/