staging: comedi: adv_pci_dio: remove need for diosubd_data 'regs' member
commit039c5c1b27e786cd92c130559800f88625988dee
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 18 Nov 2015 17:07:10 +0000 (18 10:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 23:57:40 +0000 (21 15:57 -0800)
treefddaec7abf7b20d312efac3a4d2f317ccc27b637
parent3cdddd6338749da4102788467584c8d9a2ee2699
staging: comedi: adv_pci_dio: remove need for diosubd_data 'regs' member

Currently the (*insn_bits) functions used the 'regs' member to determine how
many registers need to be read or written to update the subdevice. We can use
the subdevice 'n_chan' to determine this and make the code a bit clearer.

The (*auto_attach) also uses this member to determine how many 8255 devices
need to be initialized. These subdevices do not use the 'chans' member of
diosubd_data. Move the 'regs' value to the 'chans' to allow removing the
'regs' member completely.

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