]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/hid/uhid.c
HID: uhid: Fix returning EPOLLOUT from uhid_char_poll
[mirror_ubuntu-bionic-kernel.git] / drivers / hid / uhid.c
index 6f67d73b184e52814342834c965f181244f6b43a..e63b761f600a222e3ea7c827f9b1b65518162176 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/spinlock.h>
 #include <linux/uhid.h>
 #include <linux/wait.h>
+#include <linux/eventpoll.h>
 
 #define UHID_NAME      "uhid"
 #define UHID_BUFSIZE   32
@@ -774,7 +775,7 @@ static unsigned int uhid_char_poll(struct file *file, poll_table *wait)
        if (uhid->head != uhid->tail)
                return POLLIN | POLLRDNORM;
 
-       return 0;
+       return EPOLLOUT | EPOLLWRNORM;
 }
 
 static const struct file_operations uhid_fops = {