diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2014-05-06 13:12:01 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-23 21:25:48 +0900 |
commit | 00603a9c321e186bba000e01042529bf5cfe68a3 (patch) | |
tree | a646dcd582ad376a042c7f0d3407e3bea0ec375b /drivers/staging/comedi/comedi_buf.c | |
parent | 458c13e935d9f33fffb099e49ecb53c67ddd1a21 (diff) | |
download | op-kernel-dev-00603a9c321e186bba000e01042529bf5cfe68a3.zip op-kernel-dev-00603a9c321e186bba000e01042529bf5cfe68a3.tar.gz |
staging: comedi: pass subdevice to comedi_buf_memcpy_to()
Change the parameters of `comedi_buf_memcpy_to()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.
The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_buf.c')
-rw-r--r-- | drivers/staging/comedi/comedi_buf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c index acb042c..de850f3 100644 --- a/drivers/staging/comedi/comedi_buf.c +++ b/drivers/staging/comedi/comedi_buf.c @@ -445,9 +445,10 @@ int comedi_buf_get(struct comedi_subdevice *s, unsigned short *x) } EXPORT_SYMBOL_GPL(comedi_buf_get); -void comedi_buf_memcpy_to(struct comedi_async *async, unsigned int offset, +void comedi_buf_memcpy_to(struct comedi_subdevice *s, unsigned int offset, const void *data, unsigned int num_bytes) { + struct comedi_async *async = s->async; unsigned int write_ptr = async->buf_write_ptr + offset; if (write_ptr >= async->prealloc_bufsz) |