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

staging: comedi: ke_counter: prefer using the BIT macro

Use a macro to define the clock source options. This fixes the
checkpatch.pl issue about:

CHECK: Prefer using the BIT macro
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 4403437e
......@@ -41,9 +41,10 @@
#define KE_MSB_REG(x) (0x0c + ((x) * 0x20))
#define KE_SIGN_REG(x) (0x10 + ((x) * 0x20))
#define KE_OSC_SEL_REG 0xf8
#define KE_OSC_SEL_EXT (1 << 0)
#define KE_OSC_SEL_4MHZ (2 << 0)
#define KE_OSC_SEL_20MHZ (3 << 0)
#define KE_OSC_SEL_CLK(x) (((x) & 0x3) << 0)
#define KE_OSC_SEL_EXT KE_OSC_SEL_CLK(1)
#define KE_OSC_SEL_4MHZ KE_OSC_SEL_CLK(2)
#define KE_OSC_SEL_20MHZ KE_OSC_SEL_CLK(3)
#define KE_DO_REG 0xfc
static int ke_counter_insn_write(struct comedi_device *dev,
......
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