staging: comedi: adl_pci9118: remove 'ai_ns_min' from boardinfo
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 4 Sep 2014 17:39:30 +0000 (10:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 20:54:06 +0000 (13:54 -0700)
commit34607db8ad9d381bee30389731e42f66ff5a2c03
tree1717a16dba58951789967710b3a6e2a3885ffa7e
parentdf925ca27c10f27c06173e7227c9efacce599789
staging: comedi: adl_pci9118: remove 'ai_ns_min' from boardinfo

The minimum convert time 'ai_ns_min' is based on the sampling rate of the A/D
converter. This driver supports boards that use different ADC chips for 16-bit
and 12-bit analog inputs. These chips have different sampling rates.

For aesthetics, move the 'ai_ns_min' member from the boardinfo to the private
data. Initialize the member during the attach based on the 'maxdata' of the
analog inputs.

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