mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 02:23:16 +00:00
usb: gadget: Do not take BKL for gadget->ops->ioctl
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>
This commit is contained in:
parent
00b81fb23a
commit
1548b13b75
@ -714,9 +714,7 @@ static long ffs_ep0_ioctl(struct file *file, unsigned code, unsigned long value)
|
|||||||
struct ffs_function *func = ffs->func;
|
struct ffs_function *func = ffs->func;
|
||||||
ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV;
|
ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV;
|
||||||
} else if (gadget->ops->ioctl) {
|
} else if (gadget->ops->ioctl) {
|
||||||
lock_kernel();
|
|
||||||
ret = gadget->ops->ioctl(gadget, code, value);
|
ret = gadget->ops->ioctl(gadget, code, value);
|
||||||
unlock_kernel();
|
|
||||||
} else {
|
} else {
|
||||||
ret = -ENOTTY;
|
ret = -ENOTTY;
|
||||||
}
|
}
|
||||||
|
@ -1299,11 +1299,9 @@ static long dev_ioctl (struct file *fd, unsigned code, unsigned long value)
|
|||||||
struct usb_gadget *gadget = dev->gadget;
|
struct usb_gadget *gadget = dev->gadget;
|
||||||
long ret = -ENOTTY;
|
long ret = -ENOTTY;
|
||||||
|
|
||||||
if (gadget->ops->ioctl) {
|
if (gadget->ops->ioctl)
|
||||||
lock_kernel();
|
|
||||||
ret = gadget->ops->ioctl (gadget, code, value);
|
ret = gadget->ops->ioctl (gadget, code, value);
|
||||||
unlock_kernel();
|
|
||||||
}
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user