Skip to content

Commit c801aff

Browse files
fmeumJiri Kosina
authored andcommitted
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 <[email protected]> In-reply-to: <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 378b803 commit c801aff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/usbhid/hiddev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static __poll_t hiddev_poll(struct file *file, poll_table *wait)
416416

417417
poll_wait(file, &list->hiddev->wait, wait);
418418
if (list->head != list->tail)
419-
return EPOLLIN | EPOLLRDNORM;
419+
return EPOLLIN | EPOLLRDNORM | EPOLLOUT;
420420
if (!list->hiddev->exist)
421421
return EPOLLERR | EPOLLHUP;
422422
return 0;

0 commit comments

Comments
 (0)