staging: comedi: adl_pci9111: cleanup ai read in pci9111_ai_insn_read()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 11 Sep 2012 01:55:54 +0000 (18:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Sep 2012 03:05:54 +0000 (20:05 -0700)
commit2f002cc9b8c5e59d3e67a184d7b1520fed9e3094
treeb8614ff99ed0abe02f660d890d5f80d69adb2fc7
parentb5d8d11931f3b772487381e7ca89dfd6e5b4f0fd
staging: comedi: adl_pci9111: cleanup ai read in pci9111_ai_insn_read()

The shift, maxdata, and invert values, used to handle the 12-/16-bit
analog input differences, can be calculated based on the subdevice
maxdata value.

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