Skip to content

Commit

Permalink
vcs: make proper usage of the poll flags
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Greg Kroah-Hartman committed Nov 11, 2010
1 parent 37db8f9 commit 47c344d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/tty/vt/vc_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,12 @@ static unsigned int
vcs_poll(struct file *file, poll_table *wait)
{
struct vcs_poll_data *poll = vcs_poll_data_get(file);
int ret = 0;
int ret = DEFAULT_POLLMASK|POLLERR|POLLPRI;

if (poll) {
poll_wait(file, &poll->waitq, wait);
if (!poll->seen_last_update)
ret = POLLIN | POLLRDNORM;
if (poll->seen_last_update)
ret = DEFAULT_POLLMASK;
}
return ret;
}
Expand Down

0 comments on commit 47c344d

Please sign in to comment.