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)
commitb4780a3afb944765f4b94d79463e570e4472ccb6
tree3774db3ff7da245953406a5e47351a56d120d722
parente245b6d12691c1e178a6a075ac3cd1b7cd0d2e0e
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