From: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>, John Kacur <jkacur@gmail.com>,
Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Subject: [PATCH 1/3] input: remove BKL from mousedev
Date: Tue, 9 Mar 2010 16:19:44 -0300 [thread overview]
Message-ID: <1268162386-2745-1-git-send-email-cascardo@holoscopio.com> (raw)
There's no need for BKL in mousedev. It uses lots of locking already
that should handle the open case.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
---
drivers/input/mousedev.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index a13d80f..f34b22b 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;
}
--
1.6.6.1
next reply other threads:[~2010-03-09 19:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 19:19 Thadeu Lima de Souza Cascardo [this message]
2010-03-09 19:19 ` [PATCH 2/3] input: use input_mutex instead of BKL when opening input device Thadeu Lima de Souza Cascardo
2010-03-09 19:19 ` [PATCH 3/3] input: remove BKL from serio_raw Thadeu Lima de Souza Cascardo
2010-03-09 20:06 ` Arnd Bergmann
2010-03-09 20:06 ` [PATCH 2/3] input: use input_mutex instead of BKL when opening input device Arnd Bergmann
2010-03-09 20:12 ` Arnd Bergmann
2010-03-09 20:59 ` Thadeu Lima de Souza Cascardo
2010-03-10 6:20 ` Dmitry Torokhov
2010-03-10 6:49 ` Oliver Neukum
2010-03-10 6:56 ` Dmitry Torokhov
2010-03-09 20:05 ` [PATCH 1/3] input: remove BKL from mousedev Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1268162386-2745-1-git-send-email-cascardo@holoscopio.com \
--to=cascardo@holoscopio.com \
--cc=arnd@arndb.de \
--cc=dmitry.torokhov@gmail.com \
--cc=jkacur@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®