summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_buf.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2014-05-06 13:12:10 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-23 21:25:49 +0900
commitfcc18a9aa2c43765ba37012879936fbf142ba91c (patch)
treec4a337bf5b654ae42c045aae6302bd8a99af7e13 /drivers/staging/comedi/comedi_buf.c
parente9edef3a5454a19fd0d0c342cc88b6310b871a48 (diff)
staging: comedi: pass subdevice to comedi_buf_reset()
Change the parameters of `comedi_buf_reset()` 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_buf.c')
-rw-r--r--drivers/staging/comedi/comedi_buf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c
index f295285d2aa6..fa5d6d4d0351 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -222,8 +222,10 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
return 0;
}
-void comedi_buf_reset(struct comedi_async *async)
+void comedi_buf_reset(struct comedi_subdevice *s)
{
+ struct comedi_async *async = s->async;
+
async->buf_write_alloc_count = 0;
async->buf_write_count = 0;
async->buf_read_alloc_count = 0;