Commit 077db34c authored by Joey Gouly's avatar Joey Gouly Committed by Linus Walleij

pinctrl: apple: use modulo rather than bitwise and

This expresses the intention clearer.
Signed-off-by: default avatarJoey Gouly <joey.gouly@arm.com>
Suggested-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20211121165642.27883-11-joey.gouly@arm.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 44bddfad
...@@ -252,7 +252,7 @@ static void apple_gpio_irq_ack(struct irq_data *data) ...@@ -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)); 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)); 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) static unsigned int apple_gpio_irq_type(unsigned int type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment