From: H Hartley Sweeten Date: Tue, 9 Apr 2013 01:21:23 +0000 (-0700) Subject: staging: comedi: rti800: change return of rti800_ai_insn_read() X-Git-Tag: next-20130422~28^2~150 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0181ae77e383ca86bc5182f816c09de2bc38c2d2;p=karo-tx-linux.git staging: comedi: rti800: change return of rti800_ai_insn_read() 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c index 0084038a8b0d..bab8b31a731d 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,