aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>2010-03-09 20:38:47 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-03-09 22:05:09 -0800
commitc90c6a885ac9827921e8f94f3ce4360ae11148f1 (patch)
tree52428d528bc08f41eb8758ceb5130e3c05ed5737
parent3dd1b39497b6820219581af16e6a8831a582bb3a (diff)
Input: mousedev - remove BKL
There's no need for BKL in mousedev, relevan protection is provided by a private mutex. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/mousedev.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index a13d80f7da1..f34b22bce4f 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -15,7 +15,6 @@
#include <linux/sched.h>
#include <linux/slab.h>
-#include <linux/smp_lock.h>
#include <linux/poll.h>
#include <linux/module.h>
#include <linux/init.h>
@@ -542,10 +541,8 @@ static int mousedev_open(struct inode *inode, struct file *file)
if (i >= MOUSEDEV_MINORS)
return -ENODEV;
- lock_kernel();
error = mutex_lock_interruptible(&mousedev_table_mutex);
if (error) {
- unlock_kernel();
return error;
}
mousedev = mousedev_table[i];
@@ -554,7 +551,6 @@ static int mousedev_open(struct inode *inode, struct file *file)
mutex_unlock(&mousedev_table_mutex);
if (!mousedev) {
- unlock_kernel();
return -ENODEV;
}
@@ -575,7 +571,6 @@ static int mousedev_open(struct inode *inode, struct file *file)
goto err_free_client;
file->private_data = client;
- unlock_kernel();
return 0;
err_free_client:
@@ -583,7 +578,6 @@ static int mousedev_open(struct inode *inode, struct file *file)
kfree(client);
err_put_mousedev:
put_device(&mousedev->dev);
- unlock_kernel();
return error;
}