aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mousedev.c
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>2010-03-09 23:38:47 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-03-10 01:05:09 -0500
commitc90c6a885ac9827921e8f94f3ce4360ae11148f1 (patch)
tree52428d528bc08f41eb8758ceb5130e3c05ed5737 /drivers/input/mousedev.c
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>
Diffstat (limited to 'drivers/input/mousedev.c')
-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 a13d80f7da17..f34b22bce4ff 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -15,7 +15,6 @@
15 15
16#include <linux/sched.h> 16#include <linux/sched.h>
17#include <linux/slab.h> 17#include <linux/slab.h>
18#include <linux/smp_lock.h>
19#include <linux/poll.h> 18#include <linux/poll.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/init.h> 20#include <linux/init.h>
@@ -542,10 +541,8 @@ static int mousedev_open(struct inode *inode, struct file *file)
542 if (i >= MOUSEDEV_MINORS) 541 if (i >= MOUSEDEV_MINORS)
543 return -ENODEV; 542 return -ENODEV;
544 543
545 lock_kernel();
546 error = mutex_lock_interruptible(&mousedev_table_mutex); 544 error = mutex_lock_interruptible(&mousedev_table_mutex);
547 if (error) { 545 if (error) {
548 unlock_kernel();
549 return error; 546 return error;
550 } 547 }
551 mousedev = mousedev_table[i]; 548 mousedev = mousedev_table[i];
@@ -554,7 +551,6 @@ static int mousedev_open(struct inode *inode, struct file *file)
554 mutex_unlock(&mousedev_table_mutex); 551 mutex_unlock(&mousedev_table_mutex);
555 552
556 if (!mousedev) { 553 if (!mousedev) {
557 unlock_kernel();
558 return -ENODEV; 554 return -ENODEV;
559 } 555 }
560 556
@@ -575,7 +571,6 @@ static int mousedev_open(struct inode *inode, struct file *file)
575 goto err_free_client; 571 goto err_free_client;
576 572
577 file->private_data = client; 573 file->private_data = client;
578 unlock_kernel();
579 return 0; 574 return 0;
580 575
581 err_free_client: 576 err_free_client:
@@ -583,7 +578,6 @@ static int mousedev_open(struct inode *inode, struct file *file)
583 kfree(client); 578 kfree(client);
584 err_put_mousedev: 579 err_put_mousedev:
585 put_device(&mousedev->dev); 580 put_device(&mousedev->dev);
586 unlock_kernel();
587 return error; 581 return error;
588} 582}
589 583