diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2014-05-06 13:12:09 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-23 21:25:49 +0900 |
commit | e9edef3a5454a19fd0d0c342cc88b6310b871a48 (patch) | |
tree | fcef5da33effe22eb3b046a9ec38101e1fb4939f /drivers/staging/comedi/comedi_buf.c | |
parent | f1df8662859e7edee134d3d77f241a32c9cfb8ef (diff) |
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_buf.c')
-rw-r--r-- | drivers/staging/comedi/comedi_buf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c index a3c3f21e77f9..f295285d2aa6 100644 --- a/drivers/staging/comedi/comedi_buf.c +++ b/drivers/staging/comedi/comedi_buf.c @@ -350,8 +350,9 @@ unsigned int comedi_buf_write_free(struct comedi_subdevice *s, } EXPORT_SYMBOL_GPL(comedi_buf_write_free); -unsigned int comedi_buf_read_n_available(struct comedi_async *async) +unsigned int comedi_buf_read_n_available(struct comedi_subdevice *s) { + struct comedi_async *async = s->async; unsigned num_bytes; if (!async) @@ -439,7 +440,7 @@ EXPORT_SYMBOL_GPL(comedi_buf_put); int comedi_buf_get(struct comedi_subdevice *s, unsigned short *x) { struct comedi_async *async = s->async; - unsigned int n = comedi_buf_read_n_available(async); + unsigned int n = comedi_buf_read_n_available(s); if (n < sizeof(short)) return 0; |