staging: comedi: pcl812: prefer using the BIT macro
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 5 Oct 2015 22:47:26 +0000 (15:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 04:20:48 +0000 (21:20 -0700)
Fix the checkpatch.pl issues.

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>
drivers/staging/comedi/drivers/pcl812.c

index 8ef9fe2018e496749cb34291893d7160234e0e15..607cc880b7eb8579f8a985fbc702bf9c77f89258 100644 (file)
 #define PCL812_TIMER_BASE                      0x00
 #define PCL812_AI_LSB_REG                      0x04
 #define PCL812_AI_MSB_REG                      0x05
-#define PCL812_AI_MSB_DRDY                     (1 << 4)
+#define PCL812_AI_MSB_DRDY                     BIT(4)
 #define PCL812_AO_LSB_REG(x)                   (0x04 + ((x) * 2))
 #define PCL812_AO_MSB_REG(x)                   (0x05 + ((x) * 2))
 #define PCL812_DI_LSB_REG                      0x06
 #define PCL812_DI_MSB_REG                      0x07
 #define PCL812_STATUS_REG                      0x08
-#define PCL812_STATUS_DRDY                     (1 << 5)
+#define PCL812_STATUS_DRDY                     BIT(5)
 #define PCL812_RANGE_REG                       0x09
 #define PCL812_MUX_REG                         0x0a
 #define PCL812_MUX_CHAN(x)                     ((x) << 0)
-#define PCL812_MUX_CS0                         (1 << 4)
-#define PCL812_MUX_CS1                         (1 << 5)
+#define PCL812_MUX_CS0                         BIT(4)
+#define PCL812_MUX_CS1                         BIT(5)
 #define PCL812_CTRL_REG                                0x0b
-#define PCL812_CTRL_DISABLE_TRIG               (0 << 0)
-#define PCL812_CTRL_SOFT_TRIG                  (1 << 0)
-#define PCL812_CTRL_PACER_DMA_TRIG             (2 << 0)
-#define PCL812_CTRL_PACER_EOC_TRIG             (6 << 0)
+#define PCL812_CTRL_TRIG(x)                    (((x) & 0x7) << 0)
+#define PCL812_CTRL_DISABLE_TRIG               PCL812_CTRL_TRIG(0)
+#define PCL812_CTRL_SOFT_TRIG                  PCL812_CTRL_TRIG(1)
+#define PCL812_CTRL_PACER_DMA_TRIG             PCL812_CTRL_TRIG(2)
+#define PCL812_CTRL_PACER_EOC_TRIG             PCL812_CTRL_TRIG(6)
 #define PCL812_SOFTTRIG_REG                    0x0c
 #define PCL812_DO_LSB_REG                      0x0d
 #define PCL812_DO_MSB_REG                      0x0e