From: Javier Martinez Canillas Date: Sun, 27 Apr 2014 00:00:48 +0000 (+0200) Subject: gpio: kempld: use BIT() macro instead of shifting bits X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=459b81808f76f4a0e902e4988200373a627a57a8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Alexandre Courbot Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpio-kempld.c b/drivers/gpio/gpio-kempld.c index ebe102325569..1e5e51987d31 100644 --- a/drivers/gpio/gpio-kempld.c +++ b/drivers/gpio/gpio-kempld.c @@ -24,7 +24,7 @@ #include #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