]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
staging: comedi: adv_pci_dio: simplify the 'boardid' boardinfo
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 18 Nov 2015 17:07:12 +0000 (10:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 23:57:40 +0000 (15:57 -0800)
commit2001807e25d9a645cfaa28e893a0a5968f6b38a0
treec879d520e2d6227be98fe94541faf78aa688ca2f
parent66f516e6a31e24972b1768453c2bd1abac273ff1
staging: comedi: adv_pci_dio: simplify the 'boardid' boardinfo

The "board id" register is always 4-bits (4 di channels) and the register
used to read the bits is always > 0.

Simplify the 'boardid' boardinfo by replacing it with a 'id_reg' member
and open-coding the subdevice n_chan.

For aesthetics, remove all the *_BOARDID defines and just open-code the
register values in the boardinfo.

Add the missing boardinfo for the pci1739 board id register and increase
the nsubdevs to handle it.

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