diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2020-05-20 08:43:03 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 08:43:03 -0300 |
commit | 1279cd128bba968ebe0a2df7f7ae38bae90250ef (patch) | |
tree | df6b1a190760f51465122ca4c13492d5ac5984c6 /drivers/hid/uhid.c | |
parent | 0a8ab17689e628c84a666195bfc6ab85d11cf057 (diff) | |
parent | 2ae782ca839e0ee07de37122ddea362adff2e975 (diff) |
Merge pull request #76 from toradex/4.9-2.3.x-imx
4.9 2.3.x imx
Diffstat (limited to 'drivers/hid/uhid.c')
-rw-r--r-- | drivers/hid/uhid.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index d02ee5304217..731a7b3e0187 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c @@ -26,6 +26,7 @@ #include <linux/uhid.h> #include <linux/wait.h> #include <linux/uaccess.h> +#include <linux/eventpoll.h> #define UHID_NAME "uhid" #define UHID_BUFSIZE 32 @@ -768,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 0; + return mask; } static const struct file_operations uhid_fops = { |