diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-03-08 00:31:18 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-17 20:55:52 (GMT) |
commit | 658ebb8ce26a4e7df994abc59ef6d46dad45f8b6 (patch) | |
tree | b62026547e2ef3054c43c748c414b7dceac119ed /drivers | |
parent | 5e733d04491f9843f95b40ccee89bcd3231838ba (diff) | |
download | linux-658ebb8ce26a4e7df994abc59ef6d46dad45f8b6.tar.xz |
staging: comedi: comedi_fc: rename comedi_subdevice variables
Typically the comedi_subdevice variable is simply named 's'. Rename
the variables in this file.
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.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_fc.c b/drivers/staging/comedi/drivers/comedi_fc.c index 88be74f..9bf2d4b 100644 --- a/drivers/staging/comedi/drivers/comedi_fc.c +++ b/drivers/staging/comedi/drivers/comedi_fc.c @@ -22,11 +22,11 @@ #include "comedi_fc.h" -static void increment_scan_progress(struct comedi_subdevice *subd, +static void increment_scan_progress(struct comedi_subdevice *s, unsigned int num_bytes) { - struct comedi_async *async = subd->async; - unsigned int scan_length = cfc_bytes_per_scan(subd); + struct comedi_async *async = s->async; + unsigned int scan_length = cfc_bytes_per_scan(s); async->scan_progress += num_bytes; if (async->scan_progress >= scan_length) { @@ -36,10 +36,10 @@ static void increment_scan_progress(struct comedi_subdevice *subd, } /* Writes an array of data points to comedi's buffer */ -unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *subd, +unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *s, void *data, unsigned int num_bytes) { - struct comedi_async *async = subd->async; + struct comedi_async *async = s->async; unsigned int retval; if (num_bytes == 0) @@ -47,24 +47,24 @@ unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *subd, retval = comedi_buf_write_alloc(async, num_bytes); if (retval != num_bytes) { - dev_warn(subd->device->class_dev, "comedi: buffer overrun\n"); + dev_warn(s->device->class_dev, "comedi: buffer overrun\n"); async->events |= COMEDI_CB_OVERFLOW; return 0; } comedi_buf_memcpy_to(async, 0, data, num_bytes); comedi_buf_write_free(async, num_bytes); - increment_scan_progress(subd, num_bytes); + increment_scan_progress(s, num_bytes); async->events |= COMEDI_CB_BLOCK; return num_bytes; } EXPORT_SYMBOL_GPL(cfc_write_array_to_buffer); -unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *subd, +unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *s, void *data, unsigned int num_bytes) { - struct comedi_async *async = subd->async; + struct comedi_async *async = s->async; if (num_bytes == 0) return 0; @@ -72,7 +72,7 @@ unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *subd, num_bytes = comedi_buf_read_alloc(async, num_bytes); comedi_buf_memcpy_from(async, 0, data, num_bytes); comedi_buf_read_free(async, num_bytes); - increment_scan_progress(subd, num_bytes); + increment_scan_progress(s, num_bytes); async->events |= COMEDI_CB_BLOCK; return num_bytes; @@ -80,17 +80,17 @@ unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *subd, EXPORT_SYMBOL_GPL(cfc_read_array_from_buffer); unsigned int cfc_handle_events(struct comedi_device *dev, - struct comedi_subdevice *subd) + struct comedi_subdevice *s) { - unsigned int events = subd->async->events; + unsigned int events = s->async->events; if (events == 0) return events; if (events & (COMEDI_CB_EOA | COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW)) - subd->cancel(dev, subd); + s->cancel(dev, s); - comedi_event(dev, subd); + comedi_event(dev, s); return events; } |