mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-27 16:22:38 +07:00
staging: comedi: s626: 'ai_sample_count' is always 'stop_arg'
When the cmd->stop_src == TRIG_COUNT, the 'ai_sample_count' is the cmd->stop_arg. For a stop_src == TRIG_NONE the 'ai_sample_count' is currently set to 1 but the driver never actually uses the value. Simplify the 'stop_count' initialization by just setting it to the cmd->stop_arg. 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
27cb98142f
commit
8b9505527e
@ -2102,16 +2102,7 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
break;
|
||||
}
|
||||
|
||||
switch (cmd->stop_src) {
|
||||
case TRIG_COUNT:
|
||||
/* data arrives as one packet */
|
||||
devpriv->ai_sample_count = cmd->stop_arg;
|
||||
break;
|
||||
case TRIG_NONE:
|
||||
/* continuous acquisition */
|
||||
devpriv->ai_sample_count = 1;
|
||||
break;
|
||||
}
|
||||
devpriv->ai_sample_count = cmd->stop_arg;
|
||||
|
||||
s626_reset_adc(dev, ppl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user