summaryrefslogtreecommitdiff
path: root/drivers/hid/usbhid
diff options
context:
space:
mode:
authorFabian Henneke <fabian.henneke@gmail.com>2019-07-18 23:50:58 +0300
committerJiri Kosina <jkosina@suse.cz>2019-08-05 15:08:07 +0300
commitc801aff1a57697d79618ea3e84dc8ff79617669d (patch)
treef8c7e6580e49c69f6b348a4fbaff4a6120138c4a /drivers/hid/usbhid
parent378b80370aa1fe50f9c48a3ac8af3e416e73b89f (diff)
downloadlinux-c801aff1a57697d79618ea3e84dc8ff79617669d.tar.xz
hiddev: Return EPOLLOUT from hiddev_poll
Always return EPOLLOUT from hiddev_poll when a device is connected. This is safe since hiddev_write always fails and improves compatibility with tools like socat. Signed-off-by: Fabian Henneke <fabian@henneke.me> In-reply-to: <nycvar.YFH.7.76.1907171333160.5899@cbobk.fhfr.pm> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r--drivers/hid/usbhid/hiddev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 55b72573066b..73a76d9af974 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -416,7 +416,7 @@ static __poll_t hiddev_poll(struct file *file, poll_table *wait)
poll_wait(file, &list->hiddev->wait, wait);
if (list->head != list->tail)
- return EPOLLIN | EPOLLRDNORM;
+ return EPOLLIN | EPOLLRDNORM | EPOLLOUT;
if (!list->hiddev->exist)
return EPOLLERR | EPOLLHUP;
return 0;