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

staging: comedi: ni_mio_common: remove BUG() check in ni_cdio_cmd()



The cmd->scan_begin_src was validated in ni_cdio_cmdtest() and can only
be TRIG_EXT. Remove the switch statement and unnecessary BUG() check.

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 f9a8f606
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -3460,16 +3460,8 @@ static int ni_cdio_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
	int retval;

	ni_writel(dev, NI_M_CDO_CMD_RESET, NI_M_CDIO_CMD_REG);
	switch (cmd->scan_begin_src) {
	case TRIG_EXT:
		cdo_mode_bits |=
		    CR_CHAN(cmd->scan_begin_arg) &
	cdo_mode_bits |= CR_CHAN(cmd->scan_begin_arg) &
			 CDO_Sample_Source_Select_Mask;
		break;
	default:
		BUG();
		break;
	}
	if (cmd->scan_begin_arg & CR_INVERT)
		cdo_mode_bits |= CDO_Polarity_Bit;
	ni_writel(dev, cdo_mode_bits, NI_M_CDO_MODE_REG);