The BUG_ON() in this function can never happen.
For aesthetics, rename this CamelCase inline function and convert it into
a simple macro.
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>
return 0x2 + n;
}
-static inline unsigned NI_660x_RTSI_Second_Gate_Select(unsigned n)
-{
- BUG_ON(n > ni_660x_max_rtsi_channel);
- return 0xb + n;
-}
+#define NI_660X_RTSI_GATE2_SEL(x) (0xb + (x))
static const unsigned int counter_status_mask =
COMEDI_COUNTER_ARMED | COMEDI_COUNTER_COUNTING;
return NI_GPCT_LOGIC_LOW_GATE_SELECT;
default:
for (i = 0; i <= ni_660x_max_rtsi_channel; ++i) {
- if (ni_660x_gate_select ==
- NI_660x_RTSI_Second_Gate_Select(i)) {
+ if (ni_660x_gate_select == NI_660X_RTSI_GATE2_SEL(i))
return NI_GPCT_RTSI_GATE_SELECT(i);
- }
}
if (i <= ni_660x_max_rtsi_channel)
break;