On 2014-09-10 00:15, H Hartley Sweeten wrote:
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 <hswee...@visionengravers.com>
Cc: Ian Abbott <abbo...@mev.co.uk>
Cc: Greg Kroah-Hartman <gre...@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) {
If patch 07 is dropped, this patch is still fine (apart from the
description) as devpriv->ao_stop_count is only used when cmd->stop_src
== TRIG_COUNT.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbo...@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel