pinctrl: sx150x: Convert to immutable irq_chip
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 4 Apr 2023 09:43:11 +0000 (11:43 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 14 Apr 2023 09:08:17 +0000 (11:08 +0200)
commitdf60325839efcc0fa37f5ec64c0e29f5d84e56c8
tree06ad1b48e9530bb5977f871c0ee8656ff170512c
parent7341944c78d544d4f96cfee3c2d56ceec94d83a4
pinctrl: sx150x: Convert to immutable irq_chip

Convert the driver to immutable irq-chip with a bit of
intuition.

I switched to consistently using irqd_to_hwirq() consistently
while we are at it.

As the driver now needs to get the gpio_chip in the .irq_mask
and .irq_unmask callbacks, I switched to a pattern where we
first fetch the gpio_chip and then the state container from
that in two steps. The compiler will do the same thing anyway.

Cc: Marc Zyngier <maz@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-9-503788a7f6e6@linaro.org
drivers/pinctrl/pinctrl-sx150x.c