staging: comedi: s626: remove 'ai_continuous' from private data
This member of the private data is set based on the cmd->stop_src. Just use the cmd->stop_src directly and remove the member. 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
8c602c498c
commit
e37b20aa58
1 changed files with 1 additions and 4 deletions
|
@ -78,7 +78,6 @@ struct s626_buffer_dma {
|
|||
|
||||
struct s626_private {
|
||||
uint8_t ai_cmd_running; /* ai_cmd is running */
|
||||
uint8_t ai_continuous; /* continuous acquisition */
|
||||
int ai_sample_count; /* number of samples to acquire */
|
||||
unsigned int ai_sample_timer; /* time between samples in
|
||||
* units of the timer */
|
||||
|
@ -1502,7 +1501,7 @@ static bool s626_handle_eos_interrupt(struct comedi_device *dev)
|
|||
/* end of scan occurs */
|
||||
async->events |= COMEDI_CB_EOS;
|
||||
|
||||
if (!devpriv->ai_continuous)
|
||||
if (cmd->stop_src == TRIG_COUNT)
|
||||
devpriv->ai_sample_count--;
|
||||
if (devpriv->ai_sample_count <= 0) {
|
||||
devpriv->ai_cmd_running = 0;
|
||||
|
@ -2106,11 +2105,9 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
|||
case TRIG_COUNT:
|
||||
/* data arrives as one packet */
|
||||
devpriv->ai_sample_count = cmd->stop_arg;
|
||||
devpriv->ai_continuous = 0;
|
||||
break;
|
||||
case TRIG_NONE:
|
||||
/* continuous acquisition */
|
||||
devpriv->ai_continuous = 1;
|
||||
devpriv->ai_sample_count = 1;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue