[PATCH 08/34] staging: comedi: amplc_pci224: 'ao_stop_count' is always 'stop_arg'
H Hartley Sweeten
hsweeten at visionengravers.com
Tue Sep 9 23:15:40 UTC 2014
When the cmd->stop_src == TRIG_COUNT, the 'ao_stop_count' is the cmd->stop_arg.
For any other stop_src the 'ao_stop_count' is 0, which is also the cmd->stop_arg.
Simplify the 'ao_stop_count' initialization.
Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
drivers/staging/comedi/drivers/amplc_pci224.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
index 3b55e71..0127d7c 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -891,13 +891,7 @@ static int pci224_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
if (cmd->scan_begin_src == TRIG_TIMER)
pci224_ao_start_pacer(dev, s);
- /*
- * Sort out end of acquisition.
- */
- if (cmd->stop_src == TRIG_COUNT)
- devpriv->ao_stop_count = cmd->stop_arg;
- else /* TRIG_EXT | TRIG_NONE */
- devpriv->ao_stop_count = 0;
+ devpriv->ao_stop_count = cmd->stop_arg;
spin_lock_irqsave(&devpriv->ao_spinlock, flags);
if (cmd->start_src == TRIG_INT) {
--
2.0.3
More information about the devel
mailing list