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

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Sat May 23 05:04:23 2009 +0200

Replace the first argument type: comedi_cxt_t becomes comedi_dev_t;
the context structure is meaningless for the driver developer.

---

 include/comedi/driver.h      |    9 ++++-----
 ksrc/drivers/comedi/device.c |    4 ++--
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/include/comedi/driver.h b/include/comedi/driver.h
index 5609d90..f07ee80 100644
--- a/include/comedi/driver.h
+++ b/include/comedi/driver.h
@@ -27,9 +27,8 @@
 
 #include <linux/list.h>
 
-#include <comedi/context.h>
-
 struct comedi_link_desc;
+struct comedi_device;
 
 /** Structure containing driver declaration data.
  *
@@ -53,9 +52,9 @@ struct comedi_driver {
                       /**< Size of the driver's private data */
 
        /* Init/destroy procedures */
-       int (*attach) (comedi_cxt_t *, struct comedi_link_desc *);
-                                                            /**< Attach 
procedure */
-       int (*detach) (comedi_cxt_t *);
+       int (*attach) (struct comedi_device *, struct comedi_link_desc *);
+                                                                     /**< 
Attach procedure */
+       int (*detach) (struct comedi_device *);
                                   /**< Detach procedure */
 
 };
diff --git a/ksrc/drivers/comedi/device.c b/ksrc/drivers/comedi/device.c
index 890786b..bd9fd72 100644
--- a/ksrc/drivers/comedi/device.c
+++ b/ksrc/drivers/comedi/device.c
@@ -313,7 +313,7 @@ int comedi_assign_driver(comedi_cxt_t * cxt,
                }
        }
 
-       if ((ret = drv->attach(cxt, link_arg)) != 0)
+       if ((ret = drv->attach(dev, link_arg)) != 0)
                comedi_logerr
                    ("comedi_assign_driver: call(drv->attach) failed 
(ret=%d)\n",
                     ret);
@@ -343,7 +343,7 @@ int comedi_release_driver(comedi_cxt_t * cxt)
 
        comedi_lock_irqsave(&dev->lock, flags);
 
-       if ((ret = dev->driver->detach(cxt)) != 0)
+       if ((ret = dev->driver->detach(dev)) != 0)
                goto out_release_driver;
 
        /* Decrease module's count 


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

Reply via email to