From: Oliver Neukum Date: Thu, 14 Jan 2010 15:13:24 +0000 (+0100) Subject: USB: BKL removal: vstusb X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eedf1f17d40e24ae80007bcbe7b7e997c32995c8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git USB: BKL removal: vstusb BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/vstusb.c b/drivers/usb/misc/vstusb.c index b787b25d4cc4..874c81bb27b9 100644 --- a/drivers/usb/misc/vstusb.c +++ b/drivers/usb/misc/vstusb.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -104,23 +103,19 @@ 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); @@ -128,7 +123,6 @@ static int vstusb_open(struct inode *inode, struct file *file) /* can only open one time */ if ((!vstdev->present) || (vstdev->isopen)) { mutex_unlock(&vstdev->lock); - unlock_kernel(); return -EBUSY; } @@ -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; }