diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-07-29 15:01:39 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-30 16:55:15 -0700 |
commit | ac482be4b6312263ffd5101dc5e560d55c00b571 (patch) | |
tree | 8a4b2946c5108c0a522313119f507f1bf63f19e8 /drivers/staging/comedi/drivers/ni_labpc.h | |
parent | 5f8a5f4fa4c2c3fa7e66c7b002039a8046e4d99d (diff) |
staging: comedi: ni_labpc: pass comedi_device to the I/O callbacks
This driver uses some callbacks in the private data to handle the
port mapped or memory mapped I/O used to access the hardware.
Pass the comedi_device pointer to the helper functions so that the
base address can be found and does not need to be included in each
call.
Also, remove the inline from the helper functions.
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/ni_labpc.h')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/ni_labpc.h b/drivers/staging/comedi/drivers/ni_labpc.h index b159b4ba4877..848725696f2f 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.h +++ b/drivers/staging/comedi/drivers/ni_labpc.h @@ -79,8 +79,9 @@ struct labpc_private { * function pointers so we can use inb/outb or readb/writeb as * appropriate */ - unsigned int (*read_byte)(unsigned long address); - void (*write_byte)(unsigned int byte, unsigned long address); + unsigned int (*read_byte)(struct comedi_device *, unsigned long reg); + void (*write_byte)(struct comedi_device *, + unsigned int byte, unsigned long reg); }; int labpc_common_attach(struct comedi_device *dev, |