]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mei: amthif: enable poll for async events
authorAlexander Usyskin <alexander.usyskin@intel.com>
Tue, 24 May 2016 20:03:38 +0000 (16:03 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2016 12:35:14 +0000 (14:35 +0200)
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 <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/main.c

index 622ff19864df29caccecf03ec4986cbfb97cd419..a8d0471f817f7ebf669fcadd98151c08a5bda2ad 100644 (file)
@@ -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);