summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-09-10 10:18:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-20 19:31:09 -0700
commit01a14edeaf0456c28e2b9af3afdc0807ec6c20bd (patch)
treee0880d3a3dbc6996dc7aa27089574bfdd4a851a3 /drivers
parentbaeacd0376975bee0fdf6378e1c24587ab0b6ad4 (diff)
downloadop-kernel-dev-01a14edeaf0456c28e2b9af3afdc0807ec6c20bd.zip
op-kernel-dev-01a14edeaf0456c28e2b9af3afdc0807ec6c20bd.tar.gz
mei: bus: export mei_cldev_enabled function
Let me client device driver query of the device is connected and hence enabled. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/mei/bus.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 53525ca..4edf71a 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -368,6 +368,19 @@ u8 mei_cldev_ver(const struct mei_cl_device *cldev)
EXPORT_SYMBOL_GPL(mei_cldev_ver);
/**
+ * mei_cldev_enabled - check whether the device is enabled
+ *
+ * @cldev: mei client device
+ *
+ * Return: true if me client is initialized and connected
+ */
+bool mei_cldev_enabled(struct mei_cl_device *cldev)
+{
+ return cldev->cl && mei_cl_is_connected(cldev->cl);
+}
+EXPORT_SYMBOL_GPL(mei_cldev_enabled);
+
+/**
* mei_cl_enable_device - enable me client device
* create connection with me client
*
OpenPOWER on IntegriCloud