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

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
......@@ -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_Sample_Source_Select_Mask;
break;
default:
BUG();
break;
}
cdo_mode_bits |= CR_CHAN(cmd->scan_begin_arg) &
CDO_Sample_Source_Select_Mask;
if (cmd->scan_begin_arg & CR_INVERT)
cdo_mode_bits |= CDO_Polarity_Bit;
ni_writel(dev, cdo_mode_bits, NI_M_CDO_MODE_REG);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment