]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: das800: tidy up das800_ai_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 23 Apr 2013 01:37:03 +0000 (18:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Apr 2013 17:41:51 +0000 (10:41 -0700)
commit8b68982f005fcfd648157d6dfba53e41b4929dc5
tree3774db3ff7da245953406a5e47351a56d120d722
parentb9212c032e81fa8935a60895b134f8e7c5dc8fcd
staging: comedi: das800: tidy up das800_ai_insn_read()

Introduce a couple helper functions to read the 16-bit analog input
sample and to wait for the analog conversion to complete.

Tidy up the das800_ai_insn_read() function by using the new helpers.
Also, remove the need for 'thisboard' in the function by checking the
subdevice 'maxdata' variable to determine the analog input resolution.

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