diff options
Diffstat (limited to 'drivers/input/serio/serio_raw.c')
-rw-r--r-- | drivers/input/serio/serio_raw.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 0403622ae267..c9397c8ee97e 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/smp_lock.h> | ||
13 | #include <linux/poll.h> | 14 | #include <linux/poll.h> |
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/serio.h> | 16 | #include <linux/serio.h> |
@@ -81,9 +82,10 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
81 | struct serio_raw_list *list; | 82 | struct serio_raw_list *list; |
82 | int retval = 0; | 83 | int retval = 0; |
83 | 84 | ||
85 | lock_kernel(); | ||
84 | retval = mutex_lock_interruptible(&serio_raw_mutex); | 86 | retval = mutex_lock_interruptible(&serio_raw_mutex); |
85 | if (retval) | 87 | if (retval) |
86 | return retval; | 88 | goto out_bkl; |
87 | 89 | ||
88 | if (!(serio_raw = serio_raw_locate(iminor(inode)))) { | 90 | if (!(serio_raw = serio_raw_locate(iminor(inode)))) { |
89 | retval = -ENODEV; | 91 | retval = -ENODEV; |
@@ -108,6 +110,8 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
108 | 110 | ||
109 | out: | 111 | out: |
110 | mutex_unlock(&serio_raw_mutex); | 112 | mutex_unlock(&serio_raw_mutex); |
113 | out_bkl: | ||
114 | unlock_kernel(); | ||
111 | return retval; | 115 | return retval; |
112 | } | 116 | } |
113 | 117 | ||