diff options
-rw-r--r-- | drivers/hid/uhid.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 05ef4b05a63..b1a477f8260 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c | |||
@@ -117,6 +117,13 @@ static ssize_t uhid_char_write(struct file *file, const char __user *buffer, | |||
117 | 117 | ||
118 | static unsigned int uhid_char_poll(struct file *file, poll_table *wait) | 118 | static unsigned int uhid_char_poll(struct file *file, poll_table *wait) |
119 | { | 119 | { |
120 | struct uhid_device *uhid = file->private_data; | ||
121 | |||
122 | poll_wait(file, &uhid->waitq, wait); | ||
123 | |||
124 | if (uhid->head != uhid->tail) | ||
125 | return POLLIN | POLLRDNORM; | ||
126 | |||
120 | return 0; | 127 | return 0; |
121 | } | 128 | } |
122 | 129 | ||