USB: BKL removal: ldusb
BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
92846fbb86
commit
6248c52f6a
|
@ -33,7 +33,6 @@
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
|
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
@ -297,14 +296,12 @@ static int ld_usb_open(struct inode *inode, struct file *file)
|
||||||
int retval;
|
int retval;
|
||||||
struct usb_interface *interface;
|
struct usb_interface *interface;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
nonseekable_open(inode, file);
|
nonseekable_open(inode, file);
|
||||||
subminor = iminor(inode);
|
subminor = iminor(inode);
|
||||||
|
|
||||||
interface = usb_find_interface(&ld_usb_driver, subminor);
|
interface = usb_find_interface(&ld_usb_driver, subminor);
|
||||||
|
|
||||||
if (!interface) {
|
if (!interface) {
|
||||||
unlock_kernel();
|
|
||||||
err("%s - error, can't find device for minor %d\n",
|
err("%s - error, can't find device for minor %d\n",
|
||||||
__func__, subminor);
|
__func__, subminor);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -312,16 +309,12 @@ static int ld_usb_open(struct inode *inode, struct file *file)
|
||||||
|
|
||||||
dev = usb_get_intfdata(interface);
|
dev = usb_get_intfdata(interface);
|
||||||
|
|
||||||
if (!dev) {
|
if (!dev)
|
||||||
unlock_kernel();
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
|
||||||
|
|
||||||
/* lock this device */
|
/* lock this device */
|
||||||
if (mutex_lock_interruptible(&dev->mutex)) {
|
if (mutex_lock_interruptible(&dev->mutex))
|
||||||
unlock_kernel();
|
|
||||||
return -ERESTARTSYS;
|
return -ERESTARTSYS;
|
||||||
}
|
|
||||||
|
|
||||||
/* allow opening only once */
|
/* allow opening only once */
|
||||||
if (dev->open_count) {
|
if (dev->open_count) {
|
||||||
|
@ -360,7 +353,6 @@ static int ld_usb_open(struct inode *inode, struct file *file)
|
||||||
|
|
||||||
unlock_exit:
|
unlock_exit:
|
||||||
mutex_unlock(&dev->mutex);
|
mutex_unlock(&dev->mutex);
|
||||||
unlock_kernel();
|
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue