summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@dowhile0.org>2014-04-27 02:00:48 +0200
committerLinus Walleij <linus.walleij@linaro.org>2014-05-03 12:16:07 -0700
commit459b81808f76f4a0e902e4988200373a627a57a8 (patch)
tree9df8553e8a5f4fdb07322382237eb501c35d5e4b
parent5f077644b95229ab3b27ee422e2b702d5e89653d (diff)
downloadop-kernel-dev-459b81808f76f4a0e902e4988200373a627a57a8.zip
op-kernel-dev-459b81808f76f4a0e902e4988200373a627a57a8.tar.gz
gpio: kempld: use BIT() macro instead of shifting bits
Using the BIT() macro instead of shifting bits makes the code less error prone and also more readable. Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpio-kempld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-kempld.c b/drivers/gpio/gpio-kempld.c
index ebe1023..1e5e519 100644
--- a/drivers/gpio/gpio-kempld.c
+++ b/drivers/gpio/gpio-kempld.c
@@ -24,7 +24,7 @@
#include <linux/mfd/kempld.h>
#define KEMPLD_GPIO_MAX_NUM 16
-#define KEMPLD_GPIO_MASK(x) (1 << ((x) % 8))
+#define KEMPLD_GPIO_MASK(x) (BIT((x) % 8))
#define KEMPLD_GPIO_DIR_NUM(x) (0x40 + (x) / 8)
#define KEMPLD_GPIO_LVL_NUM(x) (0x42 + (x) / 8)
#define KEMPLD_GPIO_EVT_LVL_EDGE 0x46
OpenPOWER on IntegriCloud