aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-06-01 17:04:44 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 17:35:36 -0400
commit1548b13b75a2ec06f46220004e91c37818be6c18 (patch)
tree65fb7fa6dd3e02c2e5c94b0ee69e81d4915e053f /drivers/usb
parent00b81fb23a4937a24cb010f41ac173a786eb4c55 (diff)
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/f_fs.c2
-rw-r--r--drivers/usb/gadget/inode.c6
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index 2aaa0f75c6cf..c51c21314076 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -714,9 +714,7 @@ static long ffs_ep0_ioctl(struct file *file, unsigned code, unsigned long value)
714 struct ffs_function *func = ffs->func; 714 struct ffs_function *func = ffs->func;
715 ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV; 715 ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV;
716 } else if (gadget->ops->ioctl) { 716 } else if (gadget->ops->ioctl) {
717 lock_kernel();
718 ret = gadget->ops->ioctl(gadget, code, value); 717 ret = gadget->ops->ioctl(gadget, code, value);
719 unlock_kernel();
720 } else { 718 } else {
721 ret = -ENOTTY; 719 ret = -ENOTTY;
722 } 720 }
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index 63fc171c0ed9..fc35406fc80c 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -1299,11 +1299,9 @@ static long dev_ioctl (struct file *fd, unsigned code, unsigned long value)
1299 struct usb_gadget *gadget = dev->gadget; 1299 struct usb_gadget *gadget = dev->gadget;
1300 long ret = -ENOTTY; 1300 long ret = -ENOTTY;
1301 1301
1302 if (gadget->ops->ioctl) { 1302 if (gadget->ops->ioctl)
1303 lock_kernel();
1304 ret = gadget->ops->ioctl (gadget, code, value); 1303 ret = gadget->ops->ioctl (gadget, code, value);
1305 unlock_kernel(); 1304
1306 }
1307 return ret; 1305 return ret;
1308} 1306}
1309 1307