aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/vstusb.c
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2010-01-14 10:13:24 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:54:31 -0500
commiteedf1f17d40e24ae80007bcbe7b7e997c32995c8 (patch)
treef5b6a4c82c92e38fc7133634d6ae0ba57e1588a8 /drivers/usb/misc/vstusb.c
parent3c02b1d79e04e86f8bd2ff56da3743c2980f3e34 (diff)
USB: BKL removal: vstusb
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>
Diffstat (limited to 'drivers/usb/misc/vstusb.c')
-rw-r--r--drivers/usb/misc/vstusb.c9
1 files changed, 1 insertions, 8 deletions
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 @@
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/mutex.h> 29#include <linux/mutex.h>
30#include <linux/smp_lock.h>
31#include <linux/uaccess.h> 30#include <linux/uaccess.h>
32#include <linux/usb.h> 31#include <linux/usb.h>
33 32
@@ -104,23 +103,19 @@ static int vstusb_open(struct inode *inode, struct file *file)
104 struct vstusb_device *vstdev; 103 struct vstusb_device *vstdev;
105 struct usb_interface *interface; 104 struct usb_interface *interface;
106 105
107 lock_kernel();
108 interface = usb_find_interface(&vstusb_driver, iminor(inode)); 106 interface = usb_find_interface(&vstusb_driver, iminor(inode));
109 107
110 if (!interface) { 108 if (!interface) {
111 printk(KERN_ERR KBUILD_MODNAME 109 printk(KERN_ERR KBUILD_MODNAME
112 ": %s - error, can't find device for minor %d\n", 110 ": %s - error, can't find device for minor %d\n",
113 __func__, iminor(inode)); 111 __func__, iminor(inode));
114 unlock_kernel();
115 return -ENODEV; 112 return -ENODEV;
116 } 113 }
117 114
118 vstdev = usb_get_intfdata(interface); 115 vstdev = usb_get_intfdata(interface);
119 116
120 if (!vstdev) { 117 if (!vstdev)
121 unlock_kernel();
122 return -ENODEV; 118 return -ENODEV;
123 }
124 119
125 /* lock this device */ 120 /* lock this device */
126 mutex_lock(&vstdev->lock); 121 mutex_lock(&vstdev->lock);
@@ -128,7 +123,6 @@ static int vstusb_open(struct inode *inode, struct file *file)
128 /* can only open one time */ 123 /* can only open one time */
129 if ((!vstdev->present) || (vstdev->isopen)) { 124 if ((!vstdev->present) || (vstdev->isopen)) {
130 mutex_unlock(&vstdev->lock); 125 mutex_unlock(&vstdev->lock);
131 unlock_kernel();
132 return -EBUSY; 126 return -EBUSY;
133 } 127 }
134 128
@@ -143,7 +137,6 @@ static int vstusb_open(struct inode *inode, struct file *file)
143 dev_dbg(&vstdev->usb_dev->dev, "%s: opened\n", __func__); 137 dev_dbg(&vstdev->usb_dev->dev, "%s: opened\n", __func__);
144 138
145 mutex_unlock(&vstdev->lock); 139 mutex_unlock(&vstdev->lock);
146 unlock_kernel();
147 140
148 return 0; 141 return 0;
149} 142}