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

Commit 5f077644 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Linus Walleij
Browse files

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: 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 f9748ef1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 */
	/* upper 16 bits contains mask and lower 16 actual value */
	em_gio_write(gpio_to_priv(chip), reg,
	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)
static void em_gio_set(struct gpio_chip *chip, unsigned offset, int value)