diff options
author | Alessio Igor Bogani <abogani@texware.it> | 2010-04-25 06:37:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:39 -0400 |
commit | 1170656d94aff5e86e003394134b9c3ecbdaf10a (patch) | |
tree | afa5c43553e06a45042c05cda6700435063e8c47 | |
parent | 31436a1a64b8eed834fba5d570038dd676e04842 (diff) |
USB: sisusbvga: Remove the BKL from open
BKL is not needed here because necessary locking is already provided
by mutex sisusb->lock.
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 63a6070a478a..30d930386b65 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <linux/spinlock.h> | 47 | #include <linux/spinlock.h> |
48 | #include <linux/kref.h> | 48 | #include <linux/kref.h> |
49 | #include <linux/usb.h> | 49 | #include <linux/usb.h> |
50 | #include <linux/smp_lock.h> | ||
51 | #include <linux/vmalloc.h> | 50 | #include <linux/vmalloc.h> |
52 | 51 | ||
53 | #include "sisusb.h" | 52 | #include "sisusb.h" |
@@ -2416,14 +2415,11 @@ sisusb_open(struct inode *inode, struct file *file) | |||
2416 | struct usb_interface *interface; | 2415 | struct usb_interface *interface; |
2417 | int subminor = iminor(inode); | 2416 | int subminor = iminor(inode); |
2418 | 2417 | ||
2419 | lock_kernel(); | ||
2420 | if (!(interface = usb_find_interface(&sisusb_driver, subminor))) { | 2418 | if (!(interface = usb_find_interface(&sisusb_driver, subminor))) { |
2421 | unlock_kernel(); | ||
2422 | return -ENODEV; | 2419 | return -ENODEV; |
2423 | } | 2420 | } |
2424 | 2421 | ||
2425 | if (!(sisusb = usb_get_intfdata(interface))) { | 2422 | if (!(sisusb = usb_get_intfdata(interface))) { |
2426 | unlock_kernel(); | ||
2427 | return -ENODEV; | 2423 | return -ENODEV; |
2428 | } | 2424 | } |
2429 | 2425 | ||
@@ -2431,13 +2427,11 @@ sisusb_open(struct inode *inode, struct file *file) | |||
2431 | 2427 | ||
2432 | if (!sisusb->present || !sisusb->ready) { | 2428 | if (!sisusb->present || !sisusb->ready) { |
2433 | mutex_unlock(&sisusb->lock); | 2429 | mutex_unlock(&sisusb->lock); |
2434 | unlock_kernel(); | ||
2435 | return -ENODEV; | 2430 | return -ENODEV; |
2436 | } | 2431 | } |
2437 | 2432 | ||
2438 | if (sisusb->isopen) { | 2433 | if (sisusb->isopen) { |
2439 | mutex_unlock(&sisusb->lock); | 2434 | mutex_unlock(&sisusb->lock); |
2440 | unlock_kernel(); | ||
2441 | return -EBUSY; | 2435 | return -EBUSY; |
2442 | } | 2436 | } |
2443 | 2437 | ||
@@ -2446,13 +2440,11 @@ sisusb_open(struct inode *inode, struct file *file) | |||
2446 | if (sisusb_init_gfxdevice(sisusb, 0)) { | 2440 | if (sisusb_init_gfxdevice(sisusb, 0)) { |
2447 | mutex_unlock(&sisusb->lock); | 2441 | mutex_unlock(&sisusb->lock); |
2448 | dev_err(&sisusb->sisusb_dev->dev, "Failed to initialize device\n"); | 2442 | dev_err(&sisusb->sisusb_dev->dev, "Failed to initialize device\n"); |
2449 | unlock_kernel(); | ||
2450 | return -EIO; | 2443 | return -EIO; |
2451 | } | 2444 | } |
2452 | } else { | 2445 | } else { |
2453 | mutex_unlock(&sisusb->lock); | 2446 | mutex_unlock(&sisusb->lock); |
2454 | dev_err(&sisusb->sisusb_dev->dev, "Device not attached to USB 2.0 hub\n"); | 2447 | dev_err(&sisusb->sisusb_dev->dev, "Device not attached to USB 2.0 hub\n"); |
2455 | unlock_kernel(); | ||
2456 | return -EIO; | 2448 | return -EIO; |
2457 | } | 2449 | } |
2458 | } | 2450 | } |
@@ -2465,7 +2457,6 @@ sisusb_open(struct inode *inode, struct file *file) | |||
2465 | file->private_data = sisusb; | 2457 | file->private_data = sisusb; |
2466 | 2458 | ||
2467 | mutex_unlock(&sisusb->lock); | 2459 | mutex_unlock(&sisusb->lock); |
2468 | unlock_kernel(); | ||
2469 | 2460 | ||
2470 | return 0; | 2461 | return 0; |
2471 | } | 2462 | } |