staging: comedi: das1800: refactor 'range_ai' boardinfo
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 8 Apr 2016 19:41:44 +0000 (12:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Apr 2016 05:16:10 +0000 (22:16 -0700)
commit5068827a7818cb54763975a34a0e59f1d1827ad8
treec5f398dadf063704f12b49d4d8827b94d8ab3189
parent8114b5ecb8dc9d2b79b9cba12c4edb737da80575
staging: comedi: das1800: refactor 'range_ai' boardinfo

The boards supported by this driver have analog inputs with gains
of 1, 10, 50, and 250 ("01" type) or 1, 2, 4, and 8 ("02" type).
Unfortunately, the "01"/"02" type cannot be determined from the
boards id or by probing.

Replace the 'range_ai' member of the boardinfo with a bit-field flag,
'is_01_series' and only set it for the "01" type boards. Remove the
unnecessary initialization for the "02" type boards.

For aesthetics, rename the comedi_lrange arrays and document the gain.

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