Module: xenomai-head
Branch: master
Commit: 95e3a0e107c1a9a702259481505f815da99e8f9c
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=95e3a0e107c1a9a702259481505f815da99e8f9c

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Tue May 26 14:54:06 2009 +0200

Remove comedi_get_nbchan(), a specific function which became useless,
and add comedi_get_subd(), a more general function which might be
helpful at attach / detach time.

---

 ksrc/drivers/comedi/driver_facilities.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ksrc/drivers/comedi/driver_facilities.c 
b/ksrc/drivers/comedi/driver_facilities.c
index b8ad1c0..1e42c12 100644
--- a/ksrc/drivers/comedi/driver_facilities.c
+++ b/ksrc/drivers/comedi/driver_facilities.c
@@ -158,16 +158,23 @@ int comedi_add_subd(comedi_dev_t * dev, comedi_subd_t * 
subd);
 EXPORT_SYMBOL(comedi_add_subd);
 
 /**
- * @brief Get the channels count registered on a specific subdevice.
+ * @brief Get a pointer to the subdevice descriptor referenced by its
+ * registration index
+ *
+ * This function is scarcely useful as all the drivers callbacks get
+ * the related subdevice descriptor as first argument. 
+ * This function is not optimized, it goes through a linked list to
+ * get the proper pointer. So it must not be used in real-time context
+ * but at initialization / cleanup time (attach / detach).
  *
  * @param[in] dev Device descriptor structure
- * @param[in] subd_key Subdevice index
+ * @param[in] idx Subdevice index
  *
  * @return 0 on success, otherwise negative error code.
  *
  */
-int comedi_get_nbchan(comedi_dev_t * dev, int subd_key);
-EXPORT_SYMBOL(comedi_get_nbchan);
+comedi_subd_t *comedi_get_subd(comedi_dev_t *dev, int idx);
+EXPORT_SYMBOL(comedi_get_subd);
 
 /** @} */
 


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

Reply via email to