Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 459b8180 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Linus Walleij
Browse files

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: default avatarJavier Martinez Canillas <javier@dowhile0.org>
Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 5f077644
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,7 @@
#include <linux/mfd/kempld.h>
#include <linux/mfd/kempld.h>


#define KEMPLD_GPIO_MAX_NUM		16
#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_DIR_NUM(x)		(0x40 + (x) / 8)
#define KEMPLD_GPIO_LVL_NUM(x)		(0x42 + (x) / 8)
#define KEMPLD_GPIO_LVL_NUM(x)		(0x42 + (x) / 8)
#define KEMPLD_GPIO_EVT_LVL_EDGE	0x46
#define KEMPLD_GPIO_EVT_LVL_EDGE	0x46