[PATCH 12/13] usb:BKL removal:vstusb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 66096e469e1c8a7d2413e20708c686996fdda493 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oliver@xxxxxxxxxx>
Date: Thu, 14 Jan 2010 10:28:10 +0100
Subject: [PATCH 12/13] usb:BKL removal:vstusb

BKL was not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@xxxxxxxxxx>
---
 drivers/usb/misc/vstusb.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/misc/vstusb.c b/drivers/usb/misc/vstusb.c
index 867a01d..f26ea8d 100644
--- a/drivers/usb/misc/vstusb.c
+++ b/drivers/usb/misc/vstusb.c
@@ -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>
 
@@ -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;
 }
-- 
1.6.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux