summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAybuke Ozdemir <aybuke.147@gmail.com>2016-02-10 18:02:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-11 19:47:27 -0800
commit72315cdaba9db965af38c9b756333e2f2b8d48ec (patch)
treeefc95e10e92a9852e536c5a5e05e8576293cf1f5
parente563637b5fef2d1fbcd1efe457d4168fde7b3e0d (diff)
Staging: comedi: Prefer using the BIT macro
Replace all instances of bit shifting on 1 with the BIT(x) macro. In addition, convert other non-1 shift operations with the equivalent BIT(x) macro for uniformity. Issue pointed out by checkpatch. CHECK: Prefer using the BIT macro Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/comedi.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h
index aa7263cd926a..f1415cbcd3f0 100644
--- a/drivers/staging/comedi/comedi.h
+++ b/drivers/staging/comedi/comedi.h
@@ -72,12 +72,12 @@
#define CR_AREF(a) (((a) >> 24) & 0x03)
#define CR_FLAGS_MASK 0xfc000000
-#define CR_ALT_FILTER (1 << 26)
+#define CR_ALT_FILTER BIT(26)
#define CR_DITHER CR_ALT_FILTER
#define CR_DEGLITCH CR_ALT_FILTER
-#define CR_ALT_SOURCE (1 << 27)
-#define CR_EDGE (1 << 30)
-#define CR_INVERT (1 << 31)
+#define CR_ALT_SOURCE BIT(27)
+#define CR_EDGE BIT(30)
+#define CR_INVERT BIT(31)
#define AREF_GROUND 0x00 /* analog ref = analog ground */
#define AREF_COMMON 0x01 /* analog ref = analog common */
@@ -894,7 +894,7 @@ struct comedi_bufinfo {
#define RANGE_LENGTH(b) ((b) & 0xffff)
#define RF_UNIT(flags) ((flags) & 0xff)
-#define RF_EXTERNAL (1 << 8)
+#define RF_EXTERNAL BIT(8)
#define UNIT_volt 0
#define UNIT_mA 1