Commit c801aff1 authored by Fabian Henneke's avatar Fabian Henneke Committed by Jiri Kosina

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: default avatarFabian Henneke <fabian@henneke.me>
In-reply-to: <nycvar.YFH.7.76.1907171333160.5899@cbobk.fhfr.pm>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 378b8037
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment