]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: hidraw, uhid: Always report EPOLLOUT
authorJiri Kosina <jkosina@suse.cz>
Fri, 10 Jan 2020 14:32:51 +0000 (15:32 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 28 Apr 2020 18:03:21 +0000 (19:03 +0100)
commit2cd104ae7ab56c3ec2c9fa08239392532bc43e72
tree97419021f81252e1c19be3a9f1fa1e4f3be1508a
parent8648e95e3aa1a3d01423a98b5234192c811fc4bf
HID: hidraw, uhid: Always report EPOLLOUT

commit 9e635c2851df6caee651e589fbf937b637973c91 upstream.

hidraw and uhid device nodes are always available for writing so we should
always report EPOLLOUT and EPOLLWRNORM bits, not only in the cases when
there is nothing to read.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Fixes: be54e7461ffdc ("HID: uhid: Fix returning EPOLLOUT from uhid_char_poll")
Fixes: 9f3b61dc1dd7b ("HID: hidraw: Fix returning EPOLLOUT from hidraw_poll")
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
[bwh: Backported to 3.16:
 - Use unsigned int type instead of __poll_t
 - s/EPOLL/POLL/g]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/hid/hidraw.c
drivers/hid/uhid.c