OSDN Git Service

staging: comedi: adv_pci1710: change boardinfo 'n_aochan' to 'has_ao'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 20 Jan 2015 21:53:07 +0000 (14:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 11:59:10 +0000 (19:59 +0800)
commit87abf660912c75c08a8eeb501a4770b9e9126750
tree7d0d7767c3ab8b6b20a8d4e4878c4122d0b56cab
parent7bd428c43437ddd401af6b3214051f89628ac12f
staging: comedi: adv_pci1710: change boardinfo 'n_aochan' to 'has_ao'

Some of the boards supported by this driver have analog outputs. The pci1720
board has 4 analog output channels and the others have 2.

For aesthetics, change the 'n_aochan' member to a bit-field flag 'has_ao' and
refactor the board attach accordingly. Remove the unnecessary initialization
of the subdevice 'len_chanlist'. That member is only used by subdevices that
support async commands.

Also, remove the unnecessary 'number of channels' check in pci171x_reset().
The boards that used this function, and have analog outputs, always have 2
channels.

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