The comedi core expects the (*insn_read) functions to return the
number of data values actually read. Change the return from 'i'
to 'insn->n' to make this clearer.

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/comedi/drivers/rti800.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/rti800.c 
b/drivers/staging/comedi/drivers/rti800.c
index 0084038..bab8b31 100644
--- a/drivers/staging/comedi/drivers/rti800.c
+++ b/drivers/staging/comedi/drivers/rti800.c
@@ -223,7 +223,7 @@ static int rti800_ai_insn_read(struct comedi_device *dev,
                        data[i] ^= 0x800;
        }
 
-       return i;
+       return insn->n;
 }
 
 static int rti800_ao_insn_read(struct comedi_device *dev,
-- 
1.8.1.4

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to