mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 09:01:36 -04:00
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: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f9a8f6067d
commit
b9abc4aa75
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user