Skip to content

Commit

Permalink
USB: BKL removal: vstusb
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 3c02b1d commit eedf1f1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/usb/misc/vstusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/smp_lock.h>
#include <linux/uaccess.h>
#include <linux/usb.h>

Expand Down Expand Up @@ -104,31 +103,26 @@ static int vstusb_open(struct inode *inode, struct file *file)
struct vstusb_device *vstdev;
struct usb_interface *interface;

lock_kernel();
interface = usb_find_interface(&vstusb_driver, iminor(inode));

if (!interface) {
printk(KERN_ERR KBUILD_MODNAME
": %s - error, can't find device for minor %d\n",
__func__, iminor(inode));
unlock_kernel();
return -ENODEV;
}

vstdev = usb_get_intfdata(interface);

if (!vstdev) {
unlock_kernel();
if (!vstdev)
return -ENODEV;
}

/* lock this device */
mutex_lock(&vstdev->lock);

/* can only open one time */
if ((!vstdev->present) || (vstdev->isopen)) {
mutex_unlock(&vstdev->lock);
unlock_kernel();
return -EBUSY;
}

Expand All @@ -143,7 +137,6 @@ static int vstusb_open(struct inode *inode, struct file *file)
dev_dbg(&vstdev->usb_dev->dev, "%s: opened\n", __func__);

mutex_unlock(&vstdev->lock);
unlock_kernel();

return 0;
}
Expand Down

0 comments on commit eedf1f1

Please sign in to comment.