staging: comedi: adl_pci8164: simplify (*insn_{read,write})

The (*insn_read) and (*insn_write) functions for all the subdevices
in this driver are the same except for the 'offset' that is added
to the iobase and channel to read/write a register on the board.

Pass the 'offset' in s->private so we can use the same (*insn_read)
and (*insn->write) functions for all the subdevices.

Also, fix the (*insn_read) and (*insn_write) functions so they work
correctly. The comedi core expects them to read/write insn->n data
values and then return the number of values used.

For aesthetic reasons, add some whitespace to the subdevice init.

Remove the dev_info() noise at the end of the attach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 file changed