staging: comedi: adl_pci6208: cleanup pci6208_ao_rinsn()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 27 Jun 2012 22:07:05 +0000 (15:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2012 22:40:06 +0000 (15:40 -0700)
For aesthetic reasons, reorder the local variables and change
the return value to 'insn->n'.

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/adl_pci6208.c

index 712087801be29711d8383a152596a7a0fbb9f830..aa2db5d532afede10584f93c5f99d770a9f3b9bc 100644 (file)
@@ -107,13 +107,13 @@ static int pci6208_ao_rinsn(struct comedi_device *dev,
                            struct comedi_insn *insn, unsigned int *data)
 {
        struct pci6208_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 pci6208_dio_insn_bits(struct comedi_device *dev,