]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: 8255: add a comedi_device param to the (*io) callback
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 12 Aug 2014 18:41:19 +0000 (11:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Aug 2014 19:23:25 +0000 (12:23 -0700)
commit4b905f0caafe3defb219365157f8d68f570cab27
treeccf3c54cb2ba0aa2828f93ca955cf02abbb03f26
parent0256a48bb3800ee784a92e1a8cb06fd7ff95bd6b
staging: comedi: 8255: add a comedi_device param to the (*io) callback

The 8255 driver uses an (*io) callback to read/write the registers
of the 8255 device. The default callback provided by the driver uses
inb()/outb() calls to access to registers based on an 'iobase' that
was initialized during the subdev_8255_init() and a 'port' value.

The users of this module can optionally provide a custom (*io) callback
to handle the read/write in another manner.

Make the (*io) callback a bit more flexible by also passing the
comedi_device pointer as a parameter.

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/8255.c
drivers/staging/comedi/drivers/8255.h
drivers/staging/comedi/drivers/8255_pci.c
drivers/staging/comedi/drivers/cb_pcidas64.c
drivers/staging/comedi/drivers/daqboard2000.c
drivers/staging/comedi/drivers/ni_labpc.c
drivers/staging/comedi/drivers/ni_mio_common.c
drivers/staging/comedi/drivers/pcl724.c