[PATCH 4/8] staging: comedi: fl512: tidy up fl512_ao_insn_read()

H Hartley Sweeten hsweeten at visionengravers.com
Thu Mar 13 17:09:57 UTC 2014


From: H Hartley Sweeten <hartleys at visionengravers.com>

For aesthetics, tidy up this function to match the style used in most
of the comedi drivers for analog output (*insn_read) functions.

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/fl512.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/fl512.c b/drivers/staging/comedi/drivers/fl512.c
index 4054035..f285110 100644
--- a/drivers/staging/comedi/drivers/fl512.c
+++ b/drivers/staging/comedi/drivers/fl512.c
@@ -89,13 +89,13 @@ static int fl512_ao_insn_read(struct comedi_device *dev,
 			      unsigned int *data)
 {
 	struct fl512_private *devpriv = dev->private;
-	int n;
-	int chan = CR_CHAN(insn->chanspec);
+	unsigned int chan = CR_CHAN(insn->chanspec);
+	int i;
 
-	for (n = 0; n < insn->n; n++)
-		data[n] = devpriv->ao_readback[chan];
+	for (i = 0; i < insn->n; i++)
+		data[i] = devpriv->ao_readback[chan];
 
-	return n;
+	return insn->n;
 }
 
 static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
-- 
1.8.5.2



More information about the devel mailing list