staging: comedi: adv_pci1710: introduce pci171x_ai_read_sample()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 20 Jan 2015 21:53:22 +0000 (14:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 11:59:12 +0000 (19:59 +0800)
commit7fd2dae2500dee7da9a16557ace9506fb8aefd12
treefa67a127ed382082701872a5796fe825f8f3a1fc
parenta65e1419e64c26c3c14ba93d65ea86a416f47569
staging: comedi: adv_pci1710: introduce pci171x_ai_read_sample()

Introduce a helper function to read an analog input sample, check for
channel dropout, and mask the sample to the maxdata of the subdevice.

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