Skip to contentSkip to conversation

staging: comedi: adl_pci6208: cleanup pci6208_ao_rinsn()

PATCH In review H Hartley Sweeten 1 participant 1 message Jun 27, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 17/19 staging: comedi: adl_pci6208: cleanup pci6208_ao_rinsn()

For aesthetic reasons, reorder the local variables and change the return value to 'insn->n'.

Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/comedi/drivers/adl_pci6208.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/adl_pci6208.c +2 -2
index 7120878..aa2db5d 100644
@@ -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,
Signature · 1 line
1.7.11