From: H Hartley Sweeten Date: Wed, 7 Oct 2015 00:35:18 +0000 (-0700) Subject: staging: comedi: ke_counter: prefer using the BIT macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=377767135a7c6f6dc89b65680123411d4f470508;p=openwrt%2Fstaging%2Fblogic.git 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ke_counter.c b/drivers/staging/comedi/drivers/ke_counter.c index dc642edf4f65..93198abf0ee5 100644 --- a/drivers/staging/comedi/drivers/ke_counter.c +++ b/drivers/staging/comedi/drivers/ke_counter.c @@ -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,