]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf4aa0df360429776129de4da91702876dd2ff59a
tree02b1a1d5cd5d85877c07c64389377e7872b559ad
parentd22a9831114755339198a5c80326d7cf59bac5f2
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