summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorIan Abbott2014-05-06 14:12:07 +0200
committerGreg Kroah-Hartman2014-05-23 14:25:49 +0200
commitd13be55a37a136ee4274680308b7d0d7e3818bf3 (patch)
tree897c67a32ae2da9614cfe52617bf2c62209171ed /drivers/staging/comedi/comedi_fops.c
parentstaging: comedi: pass subdevice to comedi_buf_write_n_allocated() (diff)
downloadkernel-qcow2-linux-d13be55a37a136ee4274680308b7d0d7e3818bf3.tar.gz
kernel-qcow2-linux-d13be55a37a136ee4274680308b7d0d7e3818bf3.tar.xz
kernel-qcow2-linux-d13be55a37a136ee4274680308b7d0d7e3818bf3.zip
staging: comedi: pass subdevice to comedi_buf_read_alloc()
Change the parameters of `comedi_buf_read_alloc()` 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_fops.c')
-rw-r--r--drivers/staging/comedi/comedi_fops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index bc9386350b76..5164374f5ab2 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -993,7 +993,7 @@ static int do_bufinfo_ioctl(struct comedi_device *dev,
return -EACCES;
if (bi.bytes_read && (s->subdev_flags & SDF_CMD_READ)) {
- bi.bytes_read = comedi_buf_read_alloc(async, bi.bytes_read);
+ bi.bytes_read = comedi_buf_read_alloc(s, bi.bytes_read);
comedi_buf_read_free(async, bi.bytes_read);
if (comedi_is_subdevice_idle(s) &&
@@ -2272,7 +2272,7 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
retval = -EFAULT;
}
- comedi_buf_read_alloc(async, n);
+ comedi_buf_read_alloc(s, n);
comedi_buf_read_free(async, n);
count += n;