There is no gadget driver in the tree that
actually implements the ioctl operation, so
obviously it is not necessary to hold the
BKL around the call.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: MichaĆ Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
                struct ffs_function *func = ffs->func;
                ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV;
        } else if (gadget->ops->ioctl) {
-               lock_kernel();
                ret = gadget->ops->ioctl(gadget, code, value);
-               unlock_kernel();
        } else {
                ret = -ENOTTY;
        }
 
        struct usb_gadget       *gadget = dev->gadget;
        long ret = -ENOTTY;
 
-       if (gadget->ops->ioctl) {
-               lock_kernel();
+       if (gadget->ops->ioctl)
                ret = gadget->ops->ioctl (gadget, code, value);
-               unlock_kernel();
-       }
+
        return ret;
 }