From: Lee Jones Date: Wed, 23 Jan 2013 13:26:02 +0000 (+0000) Subject: pinctrl/abx500: use the BIT() macro where appropriate X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=49dcf086e42c990639b84152e29ebd5aa49d6dde;p=linux-beck.git pinctrl/abx500: use the BIT() macro where appropriate The BIT() macro provides a simple and easy to read way of obtaining bit offsets into things like masks and hardware registers. In this patch we're simply replacing all instances of '1 << x' with 'bit(x)'. Signed-off-by: Lee Jones Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c index 7046aef4fd6c..539c9bb2fdfa 100644 --- a/drivers/pinctrl/pinctrl-abx500.c +++ b/drivers/pinctrl/pinctrl-abx500.c @@ -157,7 +157,7 @@ static int abx500_gpio_set_bits(struct gpio_chip *chip, u8 reg, reg += offset / 8; ret = abx500_mask_and_set_register_interruptible(pct->dev, - AB8500_MISC, reg, 1 << pos, val << pos); + AB8500_MISC, reg, BIT(pos), val << pos); if (ret < 0) dev_err(pct->dev, "%s write failed\n", __func__); return ret;