diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2015-03-27 00:27:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-03 16:18:56 +0200 |
commit | 6a84d63d22a0ac79ab422b69ef2b4d75002c5641 (patch) | |
tree | 0272d21b8d66df5759a2c8e0f0d0a18f90ec812a /drivers/misc/mei/client.h | |
parent | f3de9b635d93a3d268adda428e1df94091506a42 (diff) | |
download | op-kernel-dev-6a84d63d22a0ac79ab422b69ef2b4d75002c5641.zip op-kernel-dev-6a84d63d22a0ac79ab422b69ef2b4d75002c5641.tar.gz |
mei: replace check for connection instead of transitioning
The function mei_cl_is_transitioning is just opposite
of mei_cl_is_connected. What we actually wanted to
check is if we lost connection so we can discard
the check for transition and check for 'not connected'
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/client.h')
-rw-r--r-- | drivers/misc/mei/client.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/misc/mei/client.h b/drivers/misc/mei/client.h index 7800d1b..0a39e5d 100644 --- a/drivers/misc/mei/client.h +++ b/drivers/misc/mei/client.h @@ -90,16 +90,18 @@ int mei_cl_flow_ctrl_reduce(struct mei_cl *cl); /* * MEI input output function prototype */ + +/** + * mei_cl_is_connected - host client is connected + * + * @cl: host clinet + * + * Return: true if the host clinet is connected + */ static inline bool mei_cl_is_connected(struct mei_cl *cl) { return cl->state == MEI_FILE_CONNECTED; } -static inline bool mei_cl_is_transitioning(struct mei_cl *cl) -{ - return MEI_FILE_INITIALIZING == cl->state || - MEI_FILE_DISCONNECTED == cl->state || - MEI_FILE_DISCONNECTING == cl->state; -} bool mei_cl_is_other_connecting(struct mei_cl *cl); int mei_cl_disconnect(struct mei_cl *cl); |