summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorIan Abbott2014-05-06 14:12:04 +0200
committerGreg Kroah-Hartman2014-05-23 14:25:48 +0200
commit24e894bbf247ecdeed3ed2f77f658da756760f60 (patch)
tree7aa155fcf485058cb5a22e7479d1716bb6ae908c /drivers/staging/comedi/comedi_fops.c
parentstaging: comedi: ni_tiocmd: pass subdevice to command setup functions (diff)
downloadkernel-qcow2-linux-24e894bbf247ecdeed3ed2f77f658da756760f60.tar.gz
kernel-qcow2-linux-24e894bbf247ecdeed3ed2f77f658da756760f60.tar.xz
kernel-qcow2-linux-24e894bbf247ecdeed3ed2f77f658da756760f60.zip
staging: comedi: pass subdevice to comedi_buf_write_alloc()
Change the parameters of `comedi_buf_write_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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 0affd1f96660..58c1f6e18d27 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -1004,7 +1004,7 @@ static int do_bufinfo_ioctl(struct comedi_device *dev,
if (bi.bytes_written && (s->subdev_flags & SDF_CMD_WRITE)) {
bi.bytes_written =
- comedi_buf_write_alloc(async, bi.bytes_written);
+ comedi_buf_write_alloc(s, bi.bytes_written);
comedi_buf_write_free(async, bi.bytes_written);
}
@@ -2038,7 +2038,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait)
unsigned int bps = bytes_per_sample(s);
poll_wait(file, &s->async->wait_head, wait);
- comedi_buf_write_alloc(s->async, s->async->prealloc_bufsz);
+ comedi_buf_write_alloc(s, s->async->prealloc_bufsz);
if (!s->busy || !comedi_is_subdevice_running(s) ||
comedi_buf_write_n_allocated(s->async) >= bps)
mask |= POLLOUT | POLLWRNORM;
@@ -2136,7 +2136,7 @@ static ssize_t comedi_write(struct file *file, const char __user *buf,
m = n;
if (async->buf_write_ptr + m > async->prealloc_bufsz)
m = async->prealloc_bufsz - async->buf_write_ptr;
- comedi_buf_write_alloc(async, async->prealloc_bufsz);
+ comedi_buf_write_alloc(s, async->prealloc_bufsz);
if (m > comedi_buf_write_n_allocated(async))
m = comedi_buf_write_n_allocated(async);
if (m < n)