staging: comedi: addi_apci_3120: simplify analog output boardinfo
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 14 Oct 2014 17:44:45 +0000 (10:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 07:48:55 +0000 (15:48 +0800)
commit2cd6b2b2a9ebca2d8ab9e74ac919a82e6eae45b3
treeddf6be801c21b7531622955ee42b30f2da1d482c
parent7fcf666b4a57b9317739f13a6a65d0dbecd47ca8
staging: comedi: addi_apci_3120: simplify analog output boardinfo

There are two boards supported by this driver. One with eight 14-bit analog
outputs and the other without analog outputs.

Add a bit field flag, 'has_ao', to the boardinfo and remove the 'i_NbrAoChannel'
and 'i_AoMaxdata' members. Use the new flag to determine if the analog output
subdevice needs to be initialized and open code the n_chan and maxdata.

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