]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/hid/uhid.c
HID: hidraw, uhid: Always report EPOLLOUT
[mirror_ubuntu-bionic-kernel.git] / drivers / hid / uhid.c
index e63b761f600a222e3ea7c827f9b1b65518162176..c749f449c7cb357e65b9c588c8039904badd35d3 100644 (file)
@@ -769,13 +769,14 @@ unlock:
 static unsigned int uhid_char_poll(struct file *file, poll_table *wait)
 {
        struct uhid_device *uhid = file->private_data;
+       unsigned int mask = POLLOUT | POLLWRNORM; /* uhid is always writable */
 
        poll_wait(file, &uhid->waitq, wait);
 
        if (uhid->head != uhid->tail)
-               return POLLIN | POLLRDNORM;
+               mask |= POLLIN | POLLRDNORM;
 
-       return EPOLLOUT | EPOLLWRNORM;
+       return mask;
 }
 
 static const struct file_operations uhid_fops = {