Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06f55bb7 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: amplc_dio200_common: 'stopcount' is always 'stop_arg'



When the cmd->stop_src == TRIG_COUNT, the 'stopcount' is the cmd->stop_arg. When
the stop_src == TRIG_NONE the 'stopcount' is 0, which is also the cmd->stop_arg.

Simplify the 'stopcount' initialization.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 75d756e9
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -441,13 +441,9 @@ static int dio200_subdev_intr_cmd(struct comedi_device *dev,
	int event = 0;

	spin_lock_irqsave(&subpriv->spinlock, flags);
	subpriv->active = true;

	/* Set up end of acquisition. */
	if (cmd->stop_src == TRIG_COUNT)
	subpriv->active = true;
	subpriv->stopcount = cmd->stop_arg;
	else	/* TRIG_NONE */
		subpriv->stopcount = 0;

	if (cmd->start_src == TRIG_INT)
		s->async->inttrig = dio200_inttrig_start_intr;