From: Alexander Usyskin Date: Tue, 24 May 2016 20:03:38 +0000 (-0400) Subject: mei: amthif: enable poll for async events X-Git-Tag: v4.9-rc1~149^2~134 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=9fa0be8bb66a42a5f75e00a54732c92f3772aa6e;p=linux.git mei: amthif: enable poll for async events Currently the poll function is bailing early for amthif client and ignores requests for async events notifications. Move async event processing before amthif to enable async events notifications on amthif client. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 622ff19864df..a8d0471f817f 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -609,17 +609,17 @@ static unsigned int mei_poll(struct file *file, poll_table *wait) goto out; } - if (cl == &dev->iamthif_cl) { - mask = mei_amthif_poll(file, wait); - goto out; - } - if (notify_en) { poll_wait(file, &cl->ev_wait, wait); if (cl->notify_ev) mask |= POLLPRI; } + if (cl == &dev->iamthif_cl) { + mask |= mei_amthif_poll(file, wait); + goto out; + } + if (req_events & (POLLIN | POLLRDNORM)) { poll_wait(file, &cl->rx_wait, wait);