From 0181ae77e383ca86bc5182f816c09de2bc38c2d2 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 8 Apr 2013 18:21:23 -0700 Subject: [PATCH] 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 --- 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 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, -- 2.30.2