staging: comedi: me_daq: cleanup me_ai_insn_read()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Thu, 25 Oct 2012 22:11:38 +0000 (15:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Oct 2012 16:20:03 +0000 (09:20 -0700)
commit61532e9d6e8536a6cd05eb2d38eb84ebf08784af
tree3f230f87212b458659ddfa39ce81bb5104fcfab5
parentec6521a20431723ff4fa15fdefb386184075baa2
staging: comedi: me_daq: cleanup me_ai_insn_read()

Fix the use of insn->chanspec with the CR_CHAN, CR_RANGE, and CR_AREF
macros. insn->chanspec is an unsigned int not an array.

Cleanup the comments when creating the 'val' to write to the channel
list fifo so that the code is a bit more readable.

Use the 'val' variable when getting the value from the ADC fifo and
then munging the data. This cleans up the goofy line breaks.

This function still does not follow the expectations of the comedi core.
It is supposed to read insn->n values from the channel and return those
values. Currently it only reads a single value.

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