From patchwork Thu Jul 15 17:31:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Moutinho X-Patchwork-Id: 112272 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6FHhfiq028258 for ; Thu, 15 Jul 2010 17:43:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933921Ab0GORnk (ORCPT ); Thu, 15 Jul 2010 13:43:40 -0400 Received: from commune-des.alpes.fr.eu.org ([195.88.84.51]:57405 "EHLO commune-des.alpes.fr.eu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933810Ab0GORnj (ORCPT ); Thu, 15 Jul 2010 13:43:39 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 15 Jul 2010 17:43:41 +0000 (UTC) X-Greylist: delayed 473 seconds by postgrey-1.27 at vger.kernel.org; Thu, 15 Jul 2010 13:43:39 EDT Received: from localhost (localhost [127.0.0.1]) by savines.alpes.fr.eu.org (Postfix) with ESMTP id 43E6659138A; Thu, 15 Jul 2010 19:32:50 +0200 (CEST) Received: from savines.alpes.fr.eu.org ([127.0.0.1]) by localhost (kogan.julm.commune-des.alpes.fr.eu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rUI5W5b6CEyl; Thu, 15 Jul 2010 19:32:49 +0200 (CEST) Received: by savines.alpes.fr.eu.org (Postfix, from userid 1000) id 7C81C591389; Thu, 15 Jul 2010 19:32:49 +0200 (CEST) From: Julien Moutinho Cc: Julien Moutinho , Dmitry Torokhov , Thadeu Lima de Souza Cascardo , Alexey Dobriyan , Arnd Bergmann , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: mousedev - Fix mousedev_poll() to advertise when /dev/input/mice is writable. Date: Thu, 15 Jul 2010 19:31:27 +0200 Message-Id: <1279215089-20361-1-git-send-email-julm+linux@savines.alpes.fr.eu.org> X-Mailer: git-send-email 1.7.1 To: unlisted-recipients:; (no To-header on input) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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 = {