Skip to content

Commit

Permalink
pinctrl/abx500: use the BIT() macro where appropriate
Browse files Browse the repository at this point in the history
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 <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Lee Jones authored and Linus Walleij committed Feb 5, 2013
1 parent a8f96e4 commit 49dcf08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-abx500.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 49dcf08

Please sign in to comment.