aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2010-01-13 15:33:15 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 14:54:23 -0800
commit86266452f80545285c14e20a8024f79c4fb88a86 (patch)
treeebb0a287f9bf189737d4924536d18b36492fd330 /drivers/staging
parentf9de332ebf9df71892d52f7eb64af101a647349f (diff)
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/staging')
-rw-r--r--drivers/staging/frontier/alphatrack.c3
-rw-r--r--drivers/staging/frontier/tranzport.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c
index 15aed87fe1b..e2f82f0dbad 100644
--- a/drivers/staging/frontier/alphatrack.c
+++ b/drivers/staging/frontier/alphatrack.c
@@ -41,6 +41,7 @@
#include <linux/mutex.h>
#include <linux/uaccess.h>
+#include <linux/smp_lock.h>
#include <linux/input.h>
#include <linux/usb.h>
#include <linux/poll.h>
@@ -325,6 +326,7 @@ static int usb_alphatrack_open(struct inode *inode, struct file *file)
int retval = 0;
struct usb_interface *interface;
+ lock_kernel();
nonseekable_open(inode, file);
subminor = iminor(inode);
@@ -394,6 +396,7 @@ unlock_exit:
unlock_disconnect_exit:
mutex_unlock(&disconnect_mutex);
+ unlock_kernel();
return retval;
}
diff --git a/drivers/staging/frontier/tranzport.c b/drivers/staging/frontier/tranzport.c
index ef8fcc8c67b..1d3f7dc90f4 100644
--- a/drivers/staging/frontier/tranzport.c
+++ b/drivers/staging/frontier/tranzport.c
@@ -40,6 +40,7 @@
#include <linux/mutex.h>
#include <linux/uaccess.h>
+#include <linux/smp_lock.h>
#include <linux/input.h>
#include <linux/usb.h>
#include <linux/poll.h>
@@ -343,6 +344,7 @@ static int usb_tranzport_open(struct inode *inode, struct file *file)
int retval = 0;
struct usb_interface *interface;
+ lock_kernel();
nonseekable_open(inode, file);
subminor = iminor(inode);
@@ -413,6 +415,7 @@ unlock_exit:
unlock_disconnect_exit:
mutex_unlock(&disconnect_mutex);
+ unlock_kernel();
return retval;
}