mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 16:49:22 +00:00
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>
This commit is contained in:
parent
378b80370a
commit
c801aff1a5
1 changed files with 1 additions and 1 deletions
|
@ -416,7 +416,7 @@ static __poll_t hiddev_poll(struct file *file, poll_table *wait)
|
||||||
|
|
||||||
poll_wait(file, &list->hiddev->wait, wait);
|
poll_wait(file, &list->hiddev->wait, wait);
|
||||||
if (list->head != list->tail)
|
if (list->head != list->tail)
|
||||||
return EPOLLIN | EPOLLRDNORM;
|
return EPOLLIN | EPOLLRDNORM | EPOLLOUT;
|
||||||
if (!list->hiddev->exist)
|
if (!list->hiddev->exist)
|
||||||
return EPOLLERR | EPOLLHUP;
|
return EPOLLERR | EPOLLHUP;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue