summaryrefslogtreecommitdiff
path: root/drivers/input/tsdev.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2004-07-27 14:55:34 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2004-07-27 14:55:34 -0500
commite144c08e2d3399d6471d824462071a35cfc8377c (patch)
tree3831e49a5c45f26f9daca517938f474e72f29f9a /drivers/input/tsdev.c
parent41b701f97ecd330aba7898b60ddc62ccfecb8659 (diff)
Input: fix reader wakeup conditions in mousedev, joydev and tsdev
(we want readers to wake up when underlying device is gone so they would get -ENODEV and close the device). Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tsdev.c')
-rw-r--r--drivers/input/tsdev.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c
index 762878cf3d0c..7acacb3c6894 100644
--- a/drivers/input/tsdev.c
+++ b/drivers/input/tsdev.c
@@ -19,18 +19,18 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
* Should you need to contact me, the author, you can do so either by
* e-mail - mail your message to <jsimmons@infradead.org>.
*/
@@ -210,7 +210,7 @@ static ssize_t tsdev_read(struct file *file, char __user *buffer, size_t count,
return -EAGAIN;
retval = wait_event_interruptible(list->tsdev->wait,
- (list->head != list->tail) && list->tsdev->exist);
+ list->head != list->tail || !list->tsdev->exist);
if (retval)
return retval;