Module: xenomai-abe
Branch: experimental
Commit: 08825a06726cdf8c036e162c357bb539e5988c9d
URL:    
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=08825a06726cdf8c036e162c357bb539e5988c9d

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Mon May 24 23:33:13 2010 +0200

analogy: update a4l_get_minor function (broken)

---

 include/analogy/context.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/include/analogy/context.h b/include/analogy/context.h
index e0cf01c..2442b6c 100644
--- a/include/analogy/context.h
+++ b/include/analogy/context.h
@@ -25,6 +25,8 @@
 
 #if defined(__KERNEL__) && !defined(DOXYGEN_CPP)
 
+#include <rtdm/rtdm_driver.h>
+
 struct a4l_device;
 struct a4l_buffer;
 
@@ -43,6 +45,14 @@ struct a4l_device_context {
        struct buffer buffer; 
 };
 
+static inline int a4l_get_minor(a4l_cxt_t *cxt)
+{
+       /* Get a pointer on the container structure */
+       struct rtdm_dev_context * rtdm_cxt = rtdm_private_to_context(cxt);
+       /* Get the minor index */
+       return rtdm_cxt->device->device_id;
+}
+
 #endif /* __KERNEL__ && !DOXYGEN_CPP */
 
 #endif /* __ANALOGY_CONTEXT__ */


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

Reply via email to