[PATCH 10/13] usb:BKL removal:ldusb

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

 



>From 4bcecc8298ce00b15bb7f6b1019201815a7729b3 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oliver@xxxxxxxxxx>
Date: Thu, 14 Jan 2010 10:21:16 +0100
Subject: [PATCH 10/13] usb:BKL removal:ldusb

BKL was not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@xxxxxxxxxx>
---
 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 3f4c3f2..90f1301 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -33,7 +33,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
-#include <linux/smp_lock.h>
 
 #include <asm/uaccess.h>
 #include <linux/input.h>
@@ -297,14 +296,12 @@ static int ld_usb_open(struct inode *inode, struct file *file)
 	int retval;
 	struct usb_interface *interface;
 
-	lock_kernel();
 	nonseekable_open(inode, file);
 	subminor = iminor(inode);
 
 	interface = usb_find_interface(&ld_usb_driver, subminor);
 
 	if (!interface) {
-		unlock_kernel();
 		err("%s - error, can't find device for minor %d\n",
 		     __func__, subminor);
 		return -ENODEV;
@@ -312,16 +309,12 @@ static int ld_usb_open(struct inode *inode, struct file *file)
 
 	dev = usb_get_intfdata(interface);
 
-	if (!dev) {
-		unlock_kernel();
+	if (!dev)
 		return -ENODEV;
-	}
 
 	/* lock this device */
-	if (mutex_lock_interruptible(&dev->mutex)) {
-		unlock_kernel();
+	if (mutex_lock_interruptible(&dev->mutex))
 		return -ERESTARTSYS;
-	}
 
 	/* allow opening only once */
 	if (dev->open_count) {
@@ -360,7 +353,6 @@ static int ld_usb_open(struct inode *inode, struct file *file)
 
 unlock_exit:
 	mutex_unlock(&dev->mutex);
-	unlock_kernel();
 
 	return retval;
 }
-- 
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