diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-27 10:30:38 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 14:28:51 -0700 |
commit | c8f3174a9015a88cd59fd424d3c60b25fc9bc5e1 (patch) | |
tree | 3491724d8c11d6235c3c80a1aa165ccec4ed7ed9 /drivers/staging/comedi | |
parent | 40642e95850b4425eef1eb74793d28085605ac75 (diff) |
staging: comedi: usbdux: remove 'ao_continuous' from private data
This member of the private data can be determined from the cmd->stop_src.
Do 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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/usbdux.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index 5f6b1b3c0bdb..dfbf6613a6f5 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -208,7 +208,6 @@ struct usbdux_private { unsigned int high_speed:1; unsigned int ai_cmd_running:1; unsigned int ao_cmd_running:1; - unsigned int ao_continous:1; unsigned int pwm_cmd_running:1; /* number of samples to acquire */ @@ -414,6 +413,7 @@ static void usbduxsub_ao_isoc_irq(struct urb *urb) struct comedi_device *dev = urb->context; struct comedi_subdevice *s = dev->write_subdev; struct usbdux_private *devpriv = dev->private; + struct comedi_cmd *cmd = &s->async->cmd; uint8_t *datap; int len; int ret; @@ -463,7 +463,7 @@ static void usbduxsub_ao_isoc_irq(struct urb *urb) devpriv->ao_counter = devpriv->ao_timer; /* handle non continous acquisition */ - if (!devpriv->ao_continous) { + if (cmd->stop_src == TRIG_COUNT) { /* fixed number of samples */ devpriv->ao_sample_count--; if (devpriv->ao_sample_count < 0) { @@ -1074,10 +1074,8 @@ static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s) /* data arrives as one packet */ devpriv->ao_sample_count = cmd->stop_arg; } - devpriv->ao_continous = 0; } else { /* continous acquisition */ - devpriv->ao_continous = 1; devpriv->ao_sample_count = 0; } |