]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: dmm32at: introduce dmm32at_ai_set_chanspec()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 11 Nov 2014 23:55:27 +0000 (16:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 23:33:24 +0000 (15:33 -0800)
commit3f4361ff30c4bc6b116e2a1e7c4ba986c80f5c55
treef332bbb59089d415e3832590457876c3367b9baf
parent64b0c3bf1e483d22b9d56da54457bcb682dc5a25
staging: comedi: dmm32at: introduce dmm32at_ai_set_chanspec()

Introduce a helper function to set the analog input channel scan and range
control registers. Use the new helper in the analog input (*insn_read) and
(*do_cmd) functions.

The extra sanity checks in the (*do_cmd) are not necessary. The cmd->chanlist
will always be valid and the (*do_cmdtest) validates the channel list in
Step 5.

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