diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-27 17:31:05 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 21:28:55 (GMT) |
commit | 3ba01fe6188196be85d0a384395c7b5a0f4b8546 (patch) | |
tree | 69c26d5c41ad010848df09ba113feaf94cd5650e /drivers/staging/comedi | |
parent | f5f3a2c6569eb336e0638513ae9ccc68532c632f (diff) | |
download | linux-3ba01fe6188196be85d0a384395c7b5a0f4b8546.tar.xz |
staging: comedi: comedi_fc: use comedi_cmd pointer
Use a local variable to access the comedi_cmd as a pointer instead
of getting to from the comedi_subdevice pointer.
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/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/comedi_fc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_fc.c b/drivers/staging/comedi/drivers/comedi_fc.c index cf3da2c..c33c3e5 100644 --- a/drivers/staging/comedi/drivers/comedi_fc.c +++ b/drivers/staging/comedi/drivers/comedi_fc.c @@ -24,7 +24,7 @@ unsigned int cfc_bytes_per_scan(struct comedi_subdevice *s) { - unsigned int chanlist_len = s->async->cmd.chanlist_len; + struct comedi_cmd *cmd = &s->async->cmd; unsigned int num_samples; unsigned int bits_per_sample; @@ -33,11 +33,11 @@ unsigned int cfc_bytes_per_scan(struct comedi_subdevice *s) case COMEDI_SUBD_DO: case COMEDI_SUBD_DIO: bits_per_sample = 8 * bytes_per_sample(s); - num_samples = (chanlist_len + bits_per_sample - 1) / + num_samples = (cmd->chanlist_len + bits_per_sample - 1) / bits_per_sample; break; default: - num_samples = chanlist_len; + num_samples = cmd->chanlist_len; break; } return num_samples * bytes_per_sample(s); |