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@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 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 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel