staging: comedi: ni_stc.h: simplify MSeries_AI_Config_Bank_Bits()
Simplify this helper function by using a bit-shift to set the high banks select bit. 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:
parent
f496471df9
commit
b6cd5c228e
1 changed files with 1 additions and 5 deletions
|
@ -992,11 +992,7 @@ static inline unsigned MSeries_AI_Config_Channel_Bits(unsigned channel)
|
||||||
|
|
||||||
static inline unsigned MSeries_AI_Config_Bank_Bits(unsigned channel)
|
static inline unsigned MSeries_AI_Config_Bank_Bits(unsigned channel)
|
||||||
{
|
{
|
||||||
unsigned bits = channel & 0x30;
|
return ((channel & 0x40) << 4) | (channel & 0x30);
|
||||||
|
|
||||||
if (channel & 0x40)
|
|
||||||
bits |= 0x400;
|
|
||||||
return bits;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned MSeries_AI_Config_Gain_Bits(unsigned range)
|
static inline unsigned MSeries_AI_Config_Gain_Bits(unsigned range)
|
||||||
|
|
Loading…
Add table
Reference in a new issue