diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2014-05-06 12:12:02 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-23 12:25:48 (GMT) |
commit | 2fadffc0bb2e0b33ebee72be172073f84624bc3d (patch) | |
tree | a5f4dcc374c4db597c28adcfea2e650df4d94e45 /drivers/staging/comedi/comedi_buf.c | |
parent | 00603a9c321e186bba000e01042529bf5cfe68a3 (diff) | |
download | linux-2fadffc0bb2e0b33ebee72be172073f84624bc3d.tar.xz |
staging: comedi: pass subdevice to comedi_buf_memcpy_from()
Change the parameters of `comedi_buf_memcpy_from()` 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 de850f3..199ebb4 100644 --- a/drivers/staging/comedi/comedi_buf.c +++ b/drivers/staging/comedi/comedi_buf.c @@ -472,10 +472,11 @@ void comedi_buf_memcpy_to(struct comedi_subdevice *s, unsigned int offset, } EXPORT_SYMBOL_GPL(comedi_buf_memcpy_to); -void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset, +void comedi_buf_memcpy_from(struct comedi_subdevice *s, unsigned int offset, void *dest, unsigned int nbytes) { void *src; + struct comedi_async *async = s->async; unsigned int read_ptr = async->buf_read_ptr + offset; if (read_ptr >= async->prealloc_bufsz) |