diff options
author | Joey Gouly <joey.gouly@arm.com> | 2021-11-21 16:56:41 +0000 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2021-11-27 00:55:14 +0100 |
commit | 077db34c2b007a086baa3ee87bc72794a25d0329 (patch) | |
tree | adf637c83d6daf017aa19cfa6d457e722e036fef /drivers/pinctrl/pinctrl-apple-gpio.c | |
parent | 44bddfad97e7f6290c8d578e79aa608cfb97e65f (diff) | |
download | linux-stable-077db34c2b007a086baa3ee87bc72794a25d0329.tar.gz linux-stable-077db34c2b007a086baa3ee87bc72794a25d0329.tar.bz2 linux-stable-077db34c2b007a086baa3ee87bc72794a25d0329.zip |
pinctrl: apple: use modulo rather than bitwise and
This expresses the intention clearer.
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20211121165642.27883-11-joey.gouly@arm.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-apple-gpio.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-apple-gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-apple-gpio.c b/drivers/pinctrl/pinctrl-apple-gpio.c index 8e794ebb47da..8a58c862c33a 100644 --- a/drivers/pinctrl/pinctrl-apple-gpio.c +++ b/drivers/pinctrl/pinctrl-apple-gpio.c @@ -252,7 +252,7 @@ static void apple_gpio_irq_ack(struct irq_data *data) struct apple_gpio_pinctrl *pctl = gpiochip_get_data(irq_data_get_irq_chip_data(data)); unsigned int irqgrp = FIELD_GET(REG_GPIOx_GRP, apple_gpio_get_reg(pctl, data->hwirq)); - writel(BIT(data->hwirq & 31), pctl->base + REG_IRQ(irqgrp, data->hwirq)); + writel(BIT(data->hwirq % 32), pctl->base + REG_IRQ(irqgrp, data->hwirq)); } static unsigned int apple_gpio_irq_type(unsigned int type) |