linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: mousedev - Fix mousedev_poll() to advertise when /dev/input/mice is writable.
@ 2010-07-15 17:31 Julien Moutinho
  0 siblings, 0 replies; only message in thread
From: Julien Moutinho @ 2010-07-15 17:31 UTC (permalink / raw)
  Cc: Julien Moutinho, Dmitry Torokhov, Thadeu Lima de Souza Cascardo,
	Alexey Dobriyan, Arnd Bergmann, linux-input, linux-kernel

The Microsoft ImPS/2 mouse protocol being bidirectionnal (sic)
one may have to write in /dev/input/mice; and that works better
if select() does not hang.

Signed-off-by: Julien Moutinho <julm+linux@savines.alpes.fr.eu.org>
---
 drivers/input/mousedev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index f34b22b..1f67b8f 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -768,7 +768,8 @@ static unsigned int mousedev_poll(struct file *file, poll_table *wait)
 
 	poll_wait(file, &mousedev->wait, wait);
 	return ((client->ready || client->buffer) ? (POLLIN | POLLRDNORM) : 0) |
-		(mousedev->exist ? 0 : (POLLHUP | POLLERR));
+		(mousedev->exist ?
+			(POLLOUT | POLLWRNORM) : (POLLHUP | POLLERR));
 }
 
 static const struct file_operations mousedev_fops = {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-15 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-15 17:31 [PATCH] Input: mousedev - Fix mousedev_poll() to advertise when /dev/input/mice is writable Julien Moutinho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).