提交 6248c52f 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

USB: BKL removal: ldusb

BKL was not needed at all. Removed without replacement.
Signed-off-by: NOliver Neukum <oliver@neukum.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 92846fbb
......@@ -33,7 +33,6 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <linux/input.h>
......@@ -297,14 +296,12 @@ static int ld_usb_open(struct inode *inode, struct file *file)
int retval;
struct usb_interface *interface;
lock_kernel();
nonseekable_open(inode, file);
subminor = iminor(inode);
interface = usb_find_interface(&ld_usb_driver, subminor);
if (!interface) {
unlock_kernel();
err("%s - error, can't find device for minor %d\n",
__func__, subminor);
return -ENODEV;
......@@ -312,16 +309,12 @@ static int ld_usb_open(struct inode *inode, struct file *file)
dev = usb_get_intfdata(interface);
if (!dev) {
unlock_kernel();
if (!dev)
return -ENODEV;
}
/* lock this device */
if (mutex_lock_interruptible(&dev->mutex)) {
unlock_kernel();
if (mutex_lock_interruptible(&dev->mutex))
return -ERESTARTSYS;
}
/* allow opening only once */
if (dev->open_count) {
......@@ -360,7 +353,6 @@ static int ld_usb_open(struct inode *inode, struct file *file)
unlock_exit:
mutex_unlock(&dev->mutex);
unlock_kernel();
return retval;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册