diff options
Diffstat (limited to 'drivers/usb/misc/legousbtower.c')
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index 3d4378fb441..94e1b84134d 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c @@ -82,6 +82,7 @@ #include <linux/module.h> #include <linux/completion.h> #include <linux/mutex.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <linux/usb.h> #include <linux/poll.h> @@ -345,6 +346,7 @@ static int tower_open (struct inode *inode, struct file *file) dbg(2, "%s: enter", __func__); + lock_kernel(); nonseekable_open(inode, file); subminor = iminor(inode); @@ -430,6 +432,7 @@ unlock_exit: mutex_unlock(&dev->lock); exit: + unlock_kernel(); dbg(2, "%s: leave, return value %d ", __func__, retval); return retval; |