Skip to content

Commit

Permalink
HID: uhid: Fix returning EPOLLOUT from uhid_char_poll
Browse files Browse the repository at this point in the history
Always return EPOLLOUT from uhid_char_poll to allow polling /dev/uhid
for writable state.

Fixes: 1f9dec1 ("HID: uhid: allow poll()'ing on uhid devices")
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Marcel Holtmann authored and Jiri Kosina committed Dec 9, 2019
1 parent 9f3b61d commit be54e74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hid/uhid.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ static __poll_t uhid_char_poll(struct file *file, poll_table *wait)
if (uhid->head != uhid->tail)
return EPOLLIN | EPOLLRDNORM;

return 0;
return EPOLLOUT | EPOLLWRNORM;
}

static const struct file_operations uhid_fops = {
Expand Down

0 comments on commit be54e74

Please sign in to comment.