mfd: Don't use irq_create_mapping() to resolve a mapping
authorMarc Zyngier <maz@kernel.org>
Sun, 25 Jul 2021 18:07:54 +0000 (19:07 +0100)
committerDom Cobley <popcornmix@gmail.com>
Thu, 14 Oct 2021 11:32:57 +0000 (12:32 +0100)
commit6ca13784bbaa6eeecc2d5b73776d66a35a259d27
treedadbc12749bfb42a97a2aa7e21dbdf117c9b1228
parentaf021fa40750455980099ffbec123d38326363b1
mfd: Don't use irq_create_mapping() to resolve a mapping

[ Upstream commit 9ff80e2de36d0554e3a6da18a171719fe8663c17 ]

Although irq_create_mapping() is able to deal with duplicate
mappings, it really isn't supposed to be a substitute for
irq_find_mapping(), and can result in allocations that take place
in atomic context if the mapping didn't exist.

Fix the handful of MFD drivers that use irq_create_mapping() in
interrupt context by using irq_find_mapping() instead.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/ab8500-core.c
drivers/mfd/stmpe.c
drivers/mfd/tc3589x.c
drivers/mfd/wm8994-irq.c