Commit 3ba01fe6 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f5f3a2c6
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
unsigned int cfc_bytes_per_scan(struct comedi_subdevice *s) 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 num_samples;
unsigned int bits_per_sample; unsigned int bits_per_sample;
...@@ -33,11 +33,11 @@ unsigned int cfc_bytes_per_scan(struct comedi_subdevice *s) ...@@ -33,11 +33,11 @@ unsigned int cfc_bytes_per_scan(struct comedi_subdevice *s)
case COMEDI_SUBD_DO: case COMEDI_SUBD_DO:
case COMEDI_SUBD_DIO: case COMEDI_SUBD_DIO:
bits_per_sample = 8 * bytes_per_sample(s); 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; bits_per_sample;
break; break;
default: default:
num_samples = chanlist_len; num_samples = cmd->chanlist_len;
break; break;
} }
return num_samples * bytes_per_sample(s); return num_samples * bytes_per_sample(s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment