staging: comedi: rti800: change return of rti800_ai_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 01:21:23 +0000 (18:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Apr 2013 23:29:25 +0000 (16:29 -0700)
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 <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/rti800.c

index 0084038a8b0df4f7cd8f47d211b10312b57cb02f..bab8b31a731da83a8231c2562522bf75b8924b5f 100644 (file)
@@ -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,