diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-01-23 14:26:02 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-02-05 13:54:22 +0100 |
commit | 49dcf086e42c990639b84152e29ebd5aa49d6dde (patch) | |
tree | f7b031c5ab5aa3d0ed9a098ffc04f72b2529e66f /drivers/pinctrl/pinctrl-abx500.c | |
parent | pinctrl/abx500: add AB8540 sub-driver (diff) | |
download | linux-49dcf086e42c990639b84152e29ebd5aa49d6dde.tar.xz linux-49dcf086e42c990639b84152e29ebd5aa49d6dde.zip |
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 <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-abx500.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-abx500.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |