Module: xenomai-3
Branch: wip/drivers
Commit: 403d39c5777b0c1e3e97baf6adf8bd53986f036c
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=403d39c5777b0c1e3e97baf6adf8bd53986f036c

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Jun 19 20:39:19 2016 +0200

cobalt/rtdm: add accessor to kernel device struct

Each RTDM device is mated to a regular kernel device object. Add
rtdm_dev_to_kdev() to return the address of such object.

---

 include/cobalt/kernel/rtdm/driver.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/cobalt/kernel/rtdm/driver.h 
b/include/cobalt/kernel/rtdm/driver.h
index bcf6e54..1133cca 100644
--- a/include/cobalt/kernel/rtdm/driver.h
+++ b/include/cobalt/kernel/rtdm/driver.h
@@ -398,6 +398,11 @@ void rtdm_dev_unregister(struct rtdm_device *device);
 
 #ifndef DOXYGEN_CPP /* Avoid static inline tags for RTDM in doxygen */
 
+static inline struct device *rtdm_dev_to_kdev(struct rtdm_device *device)
+{
+       return device->kdev;
+}
+
 /* --- clock services --- */
 static inline nanosecs_abs_t rtdm_clock_read(void)
 {


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to