diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-08-12 11:41:19 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-08-16 12:23:25 -0700 |
commit | 09d6dd7490ee7f1dda926e309df370e28679a71c (patch) | |
tree | ccf3c54cb2ba0aa2828f93ca955cf02abbb03f26 /drivers/staging/comedi/drivers/pcl724.c | |
parent | 4f9c63fe5333b27ab23ed399830c7977f6970744 (diff) |
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>
Diffstat (limited to 'drivers/staging/comedi/drivers/pcl724.c')
-rw-r--r-- | drivers/staging/comedi/drivers/pcl724.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/pcl724.c b/drivers/staging/comedi/drivers/pcl724.c index c7f8eb1cf8de..946b058eee6f 100644 --- a/drivers/staging/comedi/drivers/pcl724.c +++ b/drivers/staging/comedi/drivers/pcl724.c @@ -81,7 +81,8 @@ static const struct pcl724_board boardtypes[] = { }, }; -static int pcl724_8255mapped_io(int dir, int port, int data, +static int pcl724_8255mapped_io(struct comedi_device *dev, + int dir, int port, int data, unsigned long iobase) { int movport = SIZE_8255 * (iobase >> 12); |