提交 d6caedf0 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

staging: comedi: dt9812: default the analog input gain to 1

The 'default' case should never happen. In case it does, default the
gain to '1'.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 548c278c
......@@ -422,6 +422,8 @@ static void dt9812_configure_gain(struct comedi_device *dev,
rmw->or_value = F020_MASK_ADC0CF_AMP0GN2 |
F020_MASK_ADC0CF_AMP0GN1;
break;
default:
/* this should never happen, just use a gain of 1 */
case DT9812_GAIN_1:
rmw->or_value = 0x00;
break;
......@@ -438,9 +440,6 @@ static void dt9812_configure_gain(struct comedi_device *dev,
case DT9812_GAIN_16:
rmw->or_value = F020_MASK_ADC0CF_AMP0GN2;
break;
default:
dev_err(dev->class_dev, "Illegal gain %d\n", gain);
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册