staging: comedi: addi_apci_1032: prefer using the BIT macro
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 9 Oct 2015 17:32:14 +0000 (10:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 04:26:38 +0000 (21:26 -0700)
As suggested by checkpatch.pl, use the BIT macro to define the
register bits.

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/addi_apci_1032.c

index b37166d57b64cd277e7484b2be22afe72ba20c54..ccd1a91290bf9a27cc4471d5efdc6d1cebb6a22f 100644 (file)
 #define APCI1032_MODE2_REG             0x08
 #define APCI1032_STATUS_REG            0x0c
 #define APCI1032_CTRL_REG              0x10
-#define APCI1032_CTRL_INT_OR           (0 << 1)
-#define APCI1032_CTRL_INT_AND          (1 << 1)
-#define APCI1032_CTRL_INT_ENA          (1 << 2)
+#define APCI1032_CTRL_INT_MODE(x)      (((x) & 0x1) << 1)
+#define APCI1032_CTRL_INT_OR           APCI1032_CTRL_INT_MODE(0)
+#define APCI1032_CTRL_INT_AND          APCI1032_CTRL_INT_MODE(1)
+#define APCI1032_CTRL_INT_ENA          BIT(2)
 
 struct apci1032_private {
        unsigned long amcc_iobase;      /* base of AMCC I/O registers */