]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitdf31ef212d8675cfd65986f0e47366d97e2b641f
treec5f398dadf063704f12b49d4d8827b94d8ab3189
parent566f29af4019ef91734e186969b2c5e6ff9f1777
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