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>
This commit is contained in:
Oliver Neukum
2010-01-13 15:33:15 +01:00
committed by Greg Kroah-Hartman
parent f9de332ebf
commit 86266452f8
20 changed files with 99 additions and 15 deletions

View File

@@ -96,6 +96,7 @@
#include <linux/module.h>
#include <linux/wait.h>
#include <linux/mutex.h>
#include <linux/smp_lock.h>
#include <linux/usb.h>
#include <linux/fs.h>
@@ -622,6 +623,7 @@ static int mdc800_device_open (struct inode* inode, struct file *file)
int retval=0;
int errn=0;
lock_kernel();
mutex_lock(&mdc800->io_lock);
if (mdc800->state == NOT_CONNECTED)
@@ -660,6 +662,7 @@ static int mdc800_device_open (struct inode* inode, struct file *file)
error_out:
mutex_unlock(&mdc800->io_lock);
unlock_kernel();
return errn;
}