]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: stm32: check for IRQ MUX validity during alloc()
authorFabien Dessenne <fabien.dessenne@foss.st.com>
Thu, 17 Jun 2021 14:46:02 +0000 (16:46 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 25 Jun 2021 23:52:35 +0000 (01:52 +0200)
commit495bb4c27a98646a231675ae9ffa493e7f81b592
tree077f9c110fe32468f2635ea804081a12e0c7061c
parent469a2083d567eff09b909ee0921c95d2c6863c8c
pinctrl: stm32: check for IRQ MUX validity during alloc()

Considering the following irq_domain_ops call chain:
- .alloc() is called when a clients calls platform_get_irq() or
  gpiod_to_irq()
- .activate() is called next, when the clients calls
  request_threaded_irq()
Check for the IRQ MUX conflict during the first stage (alloc instead of
activate). This avoids to provide the client with an IRQ that can't be
used.

Signed-off-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Link: https://lore.kernel.org/r/20210617144602.2557619-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/stm32/pinctrl-stm32.c