diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-03-08 00:31:22 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-17 20:55:52 (GMT) |
commit | a3065bc9b420dacd54d333a35701adea104842e8 (patch) | |
tree | 787830191741ecbc20355d12c19e78ae5c0c1331 /drivers | |
parent | 8af9dd12118ef85ba93812b3388114966313dc6f (diff) | |
download | linux-a3065bc9b420dacd54d333a35701adea104842e8.tar.xz |
staging: comedi: comedi_fc: rename comedi_subdevice variables in header
Typically the comedi_subdevice variable is simply named 's'. Rename
the variables in comedi_fc.h.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/comedi_fc.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_fc.h b/drivers/staging/comedi/drivers/comedi_fc.h index a5b9d11..042bf87 100644 --- a/drivers/staging/comedi/drivers/comedi_fc.h +++ b/drivers/staging/comedi/drivers/comedi_fc.h @@ -27,16 +27,16 @@ unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *, void *data, unsigned int num_bytes); -static inline unsigned int cfc_write_to_buffer(struct comedi_subdevice *subd, +static inline unsigned int cfc_write_to_buffer(struct comedi_subdevice *s, unsigned short data) { - return cfc_write_array_to_buffer(subd, &data, sizeof(data)); + return cfc_write_array_to_buffer(s, &data, sizeof(data)); }; -static inline unsigned int cfc_write_long_to_buffer(struct comedi_subdevice - *subd, unsigned int data) +static inline unsigned int cfc_write_long_to_buffer(struct comedi_subdevice *s, + unsigned int data) { - return cfc_write_array_to_buffer(subd, &data, sizeof(data)); + return cfc_write_array_to_buffer(s, &data, sizeof(data)); }; unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *, @@ -45,24 +45,24 @@ unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *, unsigned int cfc_handle_events(struct comedi_device *, struct comedi_subdevice *); -static inline unsigned int cfc_bytes_per_scan(struct comedi_subdevice *subd) +static inline unsigned int cfc_bytes_per_scan(struct comedi_subdevice *s) { int num_samples; int bits_per_sample; - switch (subd->type) { + switch (s->type) { case COMEDI_SUBD_DI: case COMEDI_SUBD_DO: case COMEDI_SUBD_DIO: - bits_per_sample = 8 * bytes_per_sample(subd); - num_samples = (subd->async->cmd.chanlist_len + + bits_per_sample = 8 * bytes_per_sample(s); + num_samples = (s->async->cmd.chanlist_len + bits_per_sample - 1) / bits_per_sample; break; default: - num_samples = subd->async->cmd.chanlist_len; + num_samples = s->async->cmd.chanlist_len; break; } - return num_samples * bytes_per_sample(subd); + return num_samples * bytes_per_sample(s); } /** |