Input: uinput - fix returning EPOLLOUT from uinput_poll
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 5 Dec 2019 01:27:16 +0000 (17:27 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 5 Dec 2019 01:58:15 +0000 (17:58 -0800)
Always return EPOLLOUT from uinput_poll to allow polling /dev/uinput
for writable state.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Link: https://lore.kernel.org/r/20191204025014.5189-1-marcel@holtmann.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/uinput.c

index 84051f20b18a7790fea756c76f00d6b522010f71..fd253781be711d306a4f0f41ffa59bac1a284000 100644 (file)
@@ -695,7 +695,7 @@ static __poll_t uinput_poll(struct file *file, poll_table *wait)
        if (udev->head != udev->tail)
                return EPOLLIN | EPOLLRDNORM;
 
-       return 0;
+       return EPOLLOUT | EPOLLWRNORM;
 }
 
 static int uinput_release(struct inode *inode, struct file *file)