diff mbox

Input: mousedev - Fix mousedev_poll() to advertise when /dev/input/mice is writable.

Message ID 1279215089-20361-1-git-send-email-julm+linux@savines.alpes.fr.eu.org (mailing list archive)
State New, archived
Headers show

Commit Message

Julien Moutinho July 15, 2010, 5:31 p.m. UTC
None
diff mbox

Patch

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 = {