diff options
Diffstat (limited to 'drivers/usb/class/usblp.c')
-rw-r--r-- | drivers/usb/class/usblp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 93b5f85d7ce..d53f9499f93 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -56,6 +56,7 @@ #include <linux/slab.h> #include <linux/lp.h> #include <linux/mutex.h> +#include <linux/smp_lock.h> #undef DEBUG #include <linux/usb.h> @@ -395,6 +396,7 @@ static int usblp_open(struct inode *inode, struct file *file) if (minor < 0) return -ENODEV; + lock_kernel(); mutex_lock (&usblp_mutex); retval = -ENODEV; @@ -434,6 +436,7 @@ static int usblp_open(struct inode *inode, struct file *file) } out: mutex_unlock (&usblp_mutex); + unlock_kernel(); return retval; } |