staging: comedi: adl_pc19111: remove 'chanlist_len' from private data
This member of the private data is a copy of the cmd->chanlist_len. Use that instead. 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>
This commit is contained in:
parent
8eb18913e1
commit
cae5c9fb97
1 changed files with 4 additions and 7 deletions
|
@ -139,7 +139,6 @@ struct pci9111_private_data {
|
||||||
int stop_counter;
|
int stop_counter;
|
||||||
|
|
||||||
unsigned int scan_delay;
|
unsigned int scan_delay;
|
||||||
unsigned int chanlist_len;
|
|
||||||
unsigned int chunk_counter;
|
unsigned int chunk_counter;
|
||||||
unsigned int chunk_num_samples;
|
unsigned int chunk_num_samples;
|
||||||
|
|
||||||
|
@ -513,10 +512,9 @@ static int pci9111_ai_do_cmd(struct comedi_device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_private->stop_counter *= (1 + dev_private->scan_delay);
|
dev_private->stop_counter *= (1 + dev_private->scan_delay);
|
||||||
dev_private->chanlist_len = cmd->chanlist_len;
|
|
||||||
dev_private->chunk_counter = 0;
|
dev_private->chunk_counter = 0;
|
||||||
dev_private->chunk_num_samples =
|
dev_private->chunk_num_samples = cmd->chanlist_len *
|
||||||
dev_private->chanlist_len * (1 + dev_private->scan_delay);
|
(1 + dev_private->scan_delay);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -612,9 +610,8 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device)
|
||||||
|
|
||||||
while (position < num_samples) {
|
while (position < num_samples) {
|
||||||
if (dev_private->chunk_counter <
|
if (dev_private->chunk_counter <
|
||||||
dev_private->chanlist_len) {
|
cmd->chanlist_len) {
|
||||||
to_read =
|
to_read = cmd->chanlist_len -
|
||||||
dev_private->chanlist_len -
|
|
||||||
dev_private->chunk_counter;
|
dev_private->chunk_counter;
|
||||||
|
|
||||||
if (to_read >
|
if (to_read >
|
||||||
|
|
Loading…
Add table
Reference in a new issue