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
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user