summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorIan Abbott2014-05-06 14:12:09 +0200
committerGreg Kroah-Hartman2014-05-23 14:25:49 +0200
commite9edef3a5454a19fd0d0c342cc88b6310b871a48 (patch)
treefcef5da33effe22eb3b046a9ec38101e1fb4939f /drivers/staging/comedi/comedi_fops.c
parentstaging: comedi: pass subdevice to comedi_buf_read_free() (diff)
downloadkernel-qcow2-linux-e9edef3a5454a19fd0d0c342cc88b6310b871a48.tar.gz
kernel-qcow2-linux-e9edef3a5454a19fd0d0c342cc88b6310b871a48.tar.xz
kernel-qcow2-linux-e9edef3a5454a19fd0d0c342cc88b6310b871a48.zip
staging: comedi: pass subdevice to comedi_buf_read_n_available()
Change the parameters of `comedi_buf_read_n_available()` 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 365e191228be..ada6024be6ee 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2029,7 +2029,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait)
if (s && s->async) {
poll_wait(file, &s->async->wait_head, wait);
if (!s->busy || !comedi_is_subdevice_running(s) ||
- comedi_buf_read_n_available(s->async) > 0)
+ comedi_buf_read_n_available(s) > 0)
mask |= POLLIN | POLLRDNORM;
}
@@ -2229,7 +2229,7 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
n = nbytes;
- m = comedi_buf_read_n_available(async);
+ m = comedi_buf_read_n_available(s);
/* printk("%d available\n",m); */
if (async->buf_read_ptr + m > async->prealloc_bufsz)
m = async->prealloc_bufsz - async->buf_read_ptr;