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>
Showing
Please register or sign in to comment