Commit c90c6a88 authored by Thadeu Lima de Souza Cascardo's avatar Thadeu Lima de Souza Cascardo Committed by Dmitry Torokhov

Input: mousedev - remove BKL

There's no need for BKL in mousedev, relevan protection is provided by
a private mutex.
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 3dd1b394
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -542,10 +541,8 @@ static int mousedev_open(struct inode *inode, struct file *file) ...@@ -542,10 +541,8 @@ static int mousedev_open(struct inode *inode, struct file *file)
if (i >= MOUSEDEV_MINORS) if (i >= MOUSEDEV_MINORS)
return -ENODEV; return -ENODEV;
lock_kernel();
error = mutex_lock_interruptible(&mousedev_table_mutex); error = mutex_lock_interruptible(&mousedev_table_mutex);
if (error) { if (error) {
unlock_kernel();
return error; return error;
} }
mousedev = mousedev_table[i]; mousedev = mousedev_table[i];
...@@ -554,7 +551,6 @@ static int mousedev_open(struct inode *inode, struct file *file) ...@@ -554,7 +551,6 @@ static int mousedev_open(struct inode *inode, struct file *file)
mutex_unlock(&mousedev_table_mutex); mutex_unlock(&mousedev_table_mutex);
if (!mousedev) { if (!mousedev) {
unlock_kernel();
return -ENODEV; return -ENODEV;
} }
...@@ -575,7 +571,6 @@ static int mousedev_open(struct inode *inode, struct file *file) ...@@ -575,7 +571,6 @@ static int mousedev_open(struct inode *inode, struct file *file)
goto err_free_client; goto err_free_client;
file->private_data = client; file->private_data = client;
unlock_kernel();
return 0; return 0;
err_free_client: err_free_client:
...@@ -583,7 +578,6 @@ static int mousedev_open(struct inode *inode, struct file *file) ...@@ -583,7 +578,6 @@ static int mousedev_open(struct inode *inode, struct file *file)
kfree(client); kfree(client);
err_put_mousedev: err_put_mousedev:
put_device(&mousedev->dev); put_device(&mousedev->dev);
unlock_kernel();
return error; return error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment