Commit c90c6a885ac9827921e8f94f3ce4360ae11148f1
Committed by
Dmitry Torokhov
1 parent
3dd1b39497
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 0 additions and 6 deletions Side-by-side Diff
drivers/input/mousedev.c
... | ... | @@ -15,7 +15,6 @@ |
15 | 15 | |
16 | 16 | #include <linux/sched.h> |
17 | 17 | #include <linux/slab.h> |
18 | -#include <linux/smp_lock.h> | |
19 | 18 | #include <linux/poll.h> |
20 | 19 | #include <linux/module.h> |
21 | 20 | #include <linux/init.h> |
22 | 21 | |
... | ... | @@ -542,10 +541,8 @@ |
542 | 541 | if (i >= MOUSEDEV_MINORS) |
543 | 542 | return -ENODEV; |
544 | 543 | |
545 | - lock_kernel(); | |
546 | 544 | error = mutex_lock_interruptible(&mousedev_table_mutex); |
547 | 545 | if (error) { |
548 | - unlock_kernel(); | |
549 | 546 | return error; |
550 | 547 | } |
551 | 548 | mousedev = mousedev_table[i]; |
... | ... | @@ -554,7 +551,6 @@ |
554 | 551 | mutex_unlock(&mousedev_table_mutex); |
555 | 552 | |
556 | 553 | if (!mousedev) { |
557 | - unlock_kernel(); | |
558 | 554 | return -ENODEV; |
559 | 555 | } |
560 | 556 | |
... | ... | @@ -575,7 +571,6 @@ |
575 | 571 | goto err_free_client; |
576 | 572 | |
577 | 573 | file->private_data = client; |
578 | - unlock_kernel(); | |
579 | 574 | return 0; |
580 | 575 | |
581 | 576 | err_free_client: |
... | ... | @@ -583,7 +578,6 @@ |
583 | 578 | kfree(client); |
584 | 579 | err_put_mousedev: |
585 | 580 | put_device(&mousedev->dev); |
586 | - unlock_kernel(); | |
587 | 581 | return error; |
588 | 582 | } |
589 | 583 |