summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorIan Abbott2014-05-06 14:12:11 +0200
committerGreg Kroah-Hartman2014-05-23 14:25:49 +0200
commitd4526ab4e03bb16beee03547bfcbc1d8e09707f1 (patch)
tree45af4e49b5765af11f4747e024e4a8a8b62573f5 /drivers/staging/comedi/comedi_fops.c
parentstaging: comedi: pass subdevice to comedi_buf_reset() (diff)
downloadkernel-qcow2-linux-d4526ab4e03bb16beee03547bfcbc1d8e09707f1.tar.gz
kernel-qcow2-linux-d4526ab4e03bb16beee03547bfcbc1d8e09707f1.tar.xz
kernel-qcow2-linux-d4526ab4e03bb16beee03547bfcbc1d8e09707f1.zip
staging: comedi: pass subdevice to comedi_buf_is_mmapped()
Change the parameters of `comedi_buf_is_mmapped()` 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 98229bd6cfb2..012c8fd1aabb 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -251,7 +251,7 @@ static int resize_async_buffer(struct comedi_device *dev,
"subdevice is busy, cannot resize buffer\n");
return -EBUSY;
}
- if (comedi_buf_is_mmapped(async)) {
+ if (comedi_buf_is_mmapped(s)) {
dev_dbg(dev->class_dev,
"subdevice is mmapped, cannot resize buffer\n");
return -EBUSY;
@@ -635,7 +635,7 @@ static int is_device_busy(struct comedi_device *dev)
s = &dev->subdevices[i];
if (s->busy)
return 1;
- if (s->async && comedi_buf_is_mmapped(s->async))
+ if (s->async && comedi_buf_is_mmapped(s))
return 1;
}