From 2fadffc0bb2e0b33ebee72be172073f84624bc3d Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Tue, 6 May 2014 13:12:02 +0100 Subject: 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 Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_buf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/staging/comedi/comedi_buf.c') diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c index de850f3fd49d..199ebb48974c 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) -- cgit v1.2.3