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

Author: Erhart Robert (CC-DA/ESR3) <robert.erh...@de.bosch.com>
Date:   Sat Mar 22 17:55:01 2014 +0100

analogy: fix fault in proc read callback

And remove compiler warnings

---

 ksrc/drivers/analogy/transfer.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ksrc/drivers/analogy/transfer.c b/ksrc/drivers/analogy/transfer.c
index add4414..6ba7223 100644
--- a/ksrc/drivers/analogy/transfer.c
+++ b/ksrc/drivers/analogy/transfer.c
@@ -216,14 +216,14 @@ unsigned int a4l_get_irq(a4l_dev_t * dev)
 int a4l_rdproc_transfer(struct seq_file *p, void *data)
 {
        int i;
-       a4l_trf_t *transfer = (a4l_trf_t *) data;
-
+       char *type;
+       a4l_trf_t *transfer;
+       transfer = (a4l_trf_t *) p->private;
        seq_printf(p, "--  Subdevices --\n\n");
        seq_printf(p, "| idx | type\n");
 
        /* Gives the subdevice type's name */
        for (i = 0; i < transfer->nb_subd; i++) {
-               char *type;
                switch (transfer->subds[i]->flags & A4L_SUBD_TYPES) {
                case A4L_SUBD_UNUSED:
                        type = "Unused subdevice";


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

Reply via email to