staging: comedi: pcmmio: tidy up ao_rinsn()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 9 Dec 2013 22:30:49 +0000 (15:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2013 18:01:50 +0000 (10:01 -0800)
commit7af64f9acb2b13f24dfbb1c0aac91229671314d6
tree6c8ae3affeb493383d933d8099251fb1f1229be9
parent6f216c966cfc0fb585fd8f628287d3c5100b38fa
staging: comedi: pcmmio: tidy up ao_rinsn()

Rename this function so it has namespace associated with the driver.

Move the 'chan' local variable out of the for () loop. The 'chan' is
constant for the comedi_insn and only needs to be fetched once from
the insn->chanspec.

Also, remove the sanity check of the chan. The comedi core will ensure
that the chan is valid for the subdevice before calling this function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/pcmmio.c