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

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

staging: comedi: adv_pci1710: cmd->scan_begin_src can only be TRIG_FOLLOW



In Step 1 of the (*do_cmdtest), the cmd->scan_begin_src is checked to
only allow TRIG_FOLLOW. The (*do_cmd) does not need to recheck this.

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 4b1fea00
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -1115,7 +1115,6 @@ static int pci171x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
	struct comedi_cmd *cmd = &s->async->cmd;

	if (cmd->scan_begin_src == TRIG_FOLLOW) {	/*  mode 1, 2, 3 */
	if (cmd->convert_src == TRIG_TIMER) {	/*  mode 1 and 2 */
		return pci171x_ai_docmd_and_mode(cmd->start_src ==
						 TRIG_EXT ? 2 : 1, dev,
@@ -1124,7 +1123,6 @@ static int pci171x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
	if (cmd->convert_src == TRIG_EXT) {	/*  mode 3 */
		return pci171x_ai_docmd_and_mode(3, dev, s);
	}
	}

	return -1;
}