summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorFabian Henneke <fabian.henneke@gmail.com>2019-07-18 22:50:58 +0200
committerJiri Kosina <jkosina@suse.cz>2019-08-05 14:08:07 +0200
commitc801aff1a57697d79618ea3e84dc8ff79617669d (patch)
treef8c7e6580e49c69f6b348a4fbaff4a6120138c4a /drivers/hid
parent378b80370aa1fe50f9c48a3ac8af3e416e73b89f (diff)
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')
-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;