mei: fix regression on NFC connection
authorTomas Winkler <tomas.winkler@intel.com>
Thu, 19 Mar 2015 10:10:09 +0000 (12:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2015 10:36:37 +0000 (11:36 +0100)
In mei_host_client_init function we enable the all internal
connected clients including NFC. This is done before we set the device
to enabled state and let userspace call open.
We need to check only for MEI_FILE_CONNECTED in mei_cl_is_connected
in order to enable the communication with the clients before
MEI_DEV_ENABLED is set.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/client.h

index eb02f34b2fe090e359be3d4384ed37cbda19a686..7800d1bd8ba1663c025f3915a5c522afe3003f3d 100644 (file)
@@ -92,9 +92,7 @@ int mei_cl_flow_ctrl_reduce(struct mei_cl *cl);
  */
 static inline bool mei_cl_is_connected(struct mei_cl *cl)
 {
-       return  cl->dev &&
-               cl->dev->dev_state == MEI_DEV_ENABLED &&
-               cl->state == MEI_FILE_CONNECTED;
+       return  cl->state == MEI_FILE_CONNECTED;
 }
 static inline bool mei_cl_is_transitioning(struct mei_cl *cl)
 {