Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1221963 > unrolled thread

[char-misc-next 5/8] mei: bus: export mei_cldev_enabled function

Started byTomas Winkler <tomas.winkler@intel.com>
First post2015-09-10 09:20 +0200
Last post2015-09-10 09:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [char-misc-next 5/8] mei: bus: export mei_cldev_enabled function Tomas Winkler <tomas.winkler@intel.com> - 2015-09-10 09:20 +0200

#1221963 — [char-misc-next 5/8] mei: bus: export mei_cldev_enabled function

FromTomas Winkler <tomas.winkler@intel.com>
Date2015-09-10 09:20 +0200
Subject[char-misc-next 5/8] mei: bus: export mei_cldev_enabled function
Message-ID<q74jf-2ZU-15@gated-at.bofh.it>
Let me client device driver query of the device is connected
and hence enabled.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/bus.c     | 13 +++++++++++++
 include/linux/mei_cl_bus.h |  1 +
 2 files changed, 14 insertions(+)

diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 53525ca50337..4edf71acfed6 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
  *
diff --git a/include/linux/mei_cl_bus.h b/include/linux/mei_cl_bus.h
index 9834f832b098..30d1c8b94a27 100644
--- a/include/linux/mei_cl_bus.h
+++ b/include/linux/mei_cl_bus.h
@@ -93,5 +93,6 @@ void mei_cl_set_drvdata(struct mei_cl_device *device, void *data);
 
 int mei_cl_enable_device(struct mei_cl_device *device);
 int mei_cl_disable_device(struct mei_cl_device *device);
+bool mei_cldev_enabled(struct mei_cl_device *cldev);
 
 #endif /* _LINUX_MEI_CL_BUS_H */
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web