summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-em.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@dowhile0.org>2014-04-27 02:00:47 +0200
committerLinus Walleij <linus.walleij@linaro.org>2014-05-03 12:15:52 -0700
commit5f077644b95229ab3b27ee422e2b702d5e89653d (patch)
tree808f0229957024fefd792fd12f0afa47ce8d1d70 /drivers/gpio/gpio-em.c
parentf9748ef13b6a7dfe9fe9bcae8b3a8cbc10c1e188 (diff)
gpio: em: 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>
Diffstat (limited to 'drivers/gpio/gpio-em.c')
-rw-r--r--drivers/gpio/gpio-em.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index 8765bd6f48e1..1da1aa418d7e 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -212,7 +212,7 @@ static void __em_gio_set(struct gpio_chip *chip, unsigned int reg,
{
/* upper 16 bits contains mask and lower 16 actual value */
em_gio_write(gpio_to_priv(chip), reg,
- (1 << (shift + 16)) | (value << shift));
+ (BIT(shift + 16)) | (value << shift));
}
static void em_gio_set(struct gpio_chip *chip, unsigned offset, int value)