summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/comedi/comedi_buf.c')
-rw-r--r--drivers/staging/comedi/comedi_buf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c
index 6a655008655f..220816857128 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -329,9 +329,10 @@ unsigned int comedi_buf_write_n_allocated(struct comedi_async *async)
}
/* transfers a chunk from writer to filled buffer space */
-unsigned int comedi_buf_write_free(struct comedi_async *async,
+unsigned int comedi_buf_write_free(struct comedi_subdevice *s,
unsigned int nbytes)
{
+ struct comedi_async *async = s->async;
unsigned int allocated = comedi_buf_write_n_allocated(async);
if (nbytes > allocated)
@@ -426,7 +427,7 @@ int comedi_buf_put(struct comedi_subdevice *s, unsigned short x)
return 0;
}
*(unsigned short *)(async->prealloc_buf + async->buf_write_ptr) = x;
- comedi_buf_write_free(async, sizeof(short));
+ comedi_buf_write_free(s, sizeof(short));
return 1;
}
EXPORT_SYMBOL_GPL(comedi_buf_put);