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

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Sat Jan 23 23:36:10 2010 +0100

analogy: [fake] fix a bad access in the attach procedure

---

 ksrc/drivers/analogy/testing/fake.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/ksrc/drivers/analogy/testing/fake.c 
b/ksrc/drivers/analogy/testing/fake.c
index ed03763..ace6f34 100644
--- a/ksrc/drivers/analogy/testing/fake.c
+++ b/ksrc/drivers/analogy/testing/fake.c
@@ -114,9 +114,6 @@ static void ai_task_proc(void *arg)
        a4l_cmd_t *cmd = NULL;
        uint64_t now_ns, elapsed_ns=0;
 
-       while(!a4l_check_dev(subd->dev))
-               a4l_task_sleep(AI_TASK_PERIOD);
-
        while(1) {
                if(priv->timer_running != 0)
                {
@@ -300,7 +297,7 @@ int test_attach(a4l_dev_t *dev, a4l_lnkdesc_t *arg)
        a4l_dbg(1, drv_dbg, dev, 
                "quanta count = %lu...\n", priv->quanta_cnt);
 
-       /* Adds the AI subdevice to the device */
+       /* Add the AI subdevice to the device */
        subd = a4l_alloc_subd(sizeof(struct ai_priv), setup_ai_subd);
        if(subd == NULL)
                return -ENOMEM;
@@ -321,7 +318,7 @@ int test_attach(a4l_dev_t *dev, a4l_lnkdesc_t *arg)
 
        a4l_dbg(1, drv_dbg, dev, "AI subdevice registered\n");
 
-       /* Adds the DIO subdevice to the device */
+       /* Add the DIO subdevice to the device */
        subd = a4l_alloc_subd(sizeof(struct dio_priv), setup_dio_subd);
        if(subd == NULL)
                return -ENOMEM;
@@ -334,7 +331,7 @@ int test_attach(a4l_dev_t *dev, a4l_lnkdesc_t *arg)
 
        a4l_dbg(1, drv_dbg, dev, "attach procedure complete\n");
 
-       return ret;
+       return 0;
 }
 
 int test_detach(a4l_dev_t *dev)


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

Reply via email to