From: Oliver Neukum Date: Thu, 14 Jan 2010 15:12:27 +0000 (+0100) Subject: USB: BKL removal: ldusb X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6248c52f6abd5783ecdd042f6107bd172168961e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git USB: BKL removal: ldusb BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- 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 @@ #include #include #include -#include #include #include @@ -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; }