diff options
author | Nicolas Pitre <nicolas.pitre@canonical.com> | 2010-11-10 01:33:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-11 13:51:35 -0500 |
commit | 47c344d0bd290e04c57eefdb0a721726e53bb57e (patch) | |
tree | 1eb43fe592f19b9269ae3cacbe28380b31b6d5da /drivers/tty | |
parent | 37db8f91b7d9b064bc78acd1c615a410322e275d (diff) |
vcs: make proper usage of the poll flags
Kay Sievers pointed out that usage of POLLIN is well defined by POSIX,
and the current usage here doesn't follow that definition. So let's
duplicate the same semantics as implemented by sysfs_poll() instead.
Signed-off-by: Nicolas Pitre <nicolas.pitre@canonical.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/vt/vc_screen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c index 273ab44cc91d..eab3a1ff99e4 100644 --- a/drivers/tty/vt/vc_screen.c +++ b/drivers/tty/vt/vc_screen.c | |||
@@ -553,12 +553,12 @@ static unsigned int | |||
553 | vcs_poll(struct file *file, poll_table *wait) | 553 | vcs_poll(struct file *file, poll_table *wait) |
554 | { | 554 | { |
555 | struct vcs_poll_data *poll = vcs_poll_data_get(file); | 555 | struct vcs_poll_data *poll = vcs_poll_data_get(file); |
556 | int ret = 0; | 556 | int ret = DEFAULT_POLLMASK|POLLERR|POLLPRI; |
557 | 557 | ||
558 | if (poll) { | 558 | if (poll) { |
559 | poll_wait(file, &poll->waitq, wait); | 559 | poll_wait(file, &poll->waitq, wait); |
560 | if (!poll->seen_last_update) | 560 | if (poll->seen_last_update) |
561 | ret = POLLIN | POLLRDNORM; | 561 | ret = DEFAULT_POLLMASK; |
562 | } | 562 | } |
563 | return ret; | 563 | return ret; |
564 | } | 564 | } |