From: H Hartley Sweeten Date: Tue, 9 Apr 2013 01:19:23 +0000 (-0700) Subject: staging: comedi: rti800: tidy up rti800_ao_insn_read() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0682323c520cd05bac2df6117b01263df759b7b7;p=linux-beck.git staging: comedi: rti800: tidy up rti800_ao_insn_read() For aesthetic reasons, tidy up the parameters passed to this function. The comedi core expects (*insn_read) functions to return the number of data values actually read (insn->n). Change the return to make 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 226c0d52ff00..04ba9e69b00a 100644 --- a/drivers/staging/comedi/drivers/rti800.c +++ b/drivers/staging/comedi/drivers/rti800.c @@ -219,16 +219,17 @@ static int rti800_ai_insn_read(struct comedi_device *dev, static int rti800_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s, - struct comedi_insn *insn, unsigned int *data) + struct comedi_insn *insn, + unsigned int *data) { struct rti800_private *devpriv = dev->private; - int i; int chan = CR_CHAN(insn->chanspec); + int i; for (i = 0; i < insn->n; i++) data[i] = devpriv->ao_readback[chan]; - return i; + return insn->n; } static int rti800_ao_insn_write(struct comedi_device *dev,