staging: comedi: adv_pci_dio: refactor 'io_access' boardinfo
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 18 Nov 2015 17:07:09 +0000 (10:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 23:57:40 +0000 (15:57 -0800)
commit3cdddd6338749da4102788467584c8d9a2ee2699
tree02b1a1d5cd5d85877c07c64389377e7872b559ad
parentf5ceac9baacb7c83db4aba5ec059bc1a4f36273a
staging: comedi: adv_pci_dio: refactor 'io_access' boardinfo

The boards supported by this driver either use 8-bit or 16-bit I/O. The
'io_access' member of the boardinfo is used by the (*auto_attach) to
determine which (*insn_bits) function to use.

Simplify the boardinfo a bit by refactoring the 'io_access' member into
a bit-field flag 'is_16bit'. Use the new flag and remove the switch ()
code in the (*auto_attach).

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_pci_dio.c