diff options
author | Oliver Neukum <oliver@neukum.org> | 2010-01-13 14:33:15 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 22:54:23 (GMT) |
commit | 86266452f80545285c14e20a8024f79c4fb88a86 (patch) | |
tree | ebb0a287f9bf189737d4924536d18b36492fd330 /drivers/usb/class/usbtmc.c | |
parent | f9de332ebf9df71892d52f7eb64af101a647349f (diff) | |
download | linux-86266452f80545285c14e20a8024f79c4fb88a86.tar.xz |
USB: Push BKL on open down into the drivers
Straightforward push into the drivers to allow
auditing individual drivers separately
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class/usbtmc.c')
-rw-r--r-- | drivers/usb/class/usbtmc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 8588c09..426bfc7 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c @@ -26,6 +26,7 @@ #include <linux/uaccess.h> #include <linux/kref.h> #include <linux/mutex.h> +#include <linux/smp_lock.h> #include <linux/usb.h> #include <linux/usb/tmc.h> @@ -113,6 +114,7 @@ static int usbtmc_open(struct inode *inode, struct file *filp) struct usbtmc_device_data *data; int retval = 0; + lock_kernel(); intf = usb_find_interface(&usbtmc_driver, iminor(inode)); if (!intf) { printk(KERN_ERR KBUILD_MODNAME @@ -128,6 +130,7 @@ static int usbtmc_open(struct inode *inode, struct file *filp) filp->private_data = data; exit: + unlock_kernel(); return retval; } |