diff options
author | Oliver Neukum <oliver@neukum.org> | 2010-01-14 10:12:27 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 17:54:31 -0500 |
commit | 6248c52f6abd5783ecdd042f6107bd172168961e (patch) | |
tree | 2ce4209a162825681fa7750e8f82fddfd697b577 | |
parent | 92846fbb861f64b9db21f06d6878ca02c67554dc (diff) |
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>
-rw-r--r-- | drivers/usb/misc/ldusb.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 8de32df5978a..7c0bd13eccb2 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/mutex.h> | 35 | #include <linux/mutex.h> |
36 | #include <linux/smp_lock.h> | ||
37 | 36 | ||
38 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
39 | #include <linux/input.h> | 38 | #include <linux/input.h> |
@@ -297,14 +296,12 @@ static int ld_usb_open(struct inode *inode, struct file *file) | |||
297 | int retval; | 296 | int retval; |
298 | struct usb_interface *interface; | 297 | struct usb_interface *interface; |
299 | 298 | ||
300 | lock_kernel(); | ||
301 | nonseekable_open(inode, file); | 299 | nonseekable_open(inode, file); |
302 | subminor = iminor(inode); | 300 | subminor = iminor(inode); |
303 | 301 | ||
304 | interface = usb_find_interface(&ld_usb_driver, subminor); | 302 | interface = usb_find_interface(&ld_usb_driver, subminor); |
305 | 303 | ||
306 | if (!interface) { | 304 | if (!interface) { |
307 | unlock_kernel(); | ||
308 | err("%s - error, can't find device for minor %d\n", | 305 | err("%s - error, can't find device for minor %d\n", |
309 | __func__, subminor); | 306 | __func__, subminor); |
310 | return -ENODEV; | 307 | return -ENODEV; |
@@ -312,16 +309,12 @@ static int ld_usb_open(struct inode *inode, struct file *file) | |||
312 | 309 | ||
313 | dev = usb_get_intfdata(interface); | 310 | dev = usb_get_intfdata(interface); |
314 | 311 | ||
315 | if (!dev) { | 312 | if (!dev) |
316 | unlock_kernel(); | ||
317 | return -ENODEV; | 313 | return -ENODEV; |
318 | } | ||
319 | 314 | ||
320 | /* lock this device */ | 315 | /* lock this device */ |
321 | if (mutex_lock_interruptible(&dev->mutex)) { | 316 | if (mutex_lock_interruptible(&dev->mutex)) |
322 | unlock_kernel(); | ||
323 | return -ERESTARTSYS; | 317 | return -ERESTARTSYS; |
324 | } | ||
325 | 318 | ||
326 | /* allow opening only once */ | 319 | /* allow opening only once */ |
327 | if (dev->open_count) { | 320 | if (dev->open_count) { |
@@ -360,7 +353,6 @@ static int ld_usb_open(struct inode *inode, struct file *file) | |||
360 | 353 | ||
361 | unlock_exit: | 354 | unlock_exit: |
362 | mutex_unlock(&dev->mutex); | 355 | mutex_unlock(&dev->mutex); |
363 | unlock_kernel(); | ||
364 | 356 | ||
365 | return retval; | 357 | return retval; |
366 | } | 358 | } |