[PATCH 08/10] gpio: mpc8xxx: Drop stale remove callback clearing chained handler
From: Lee Jones
Date: Thu Dec 03 2026 - 15:57:27 EST
Commit 698b8eeaed72 ("gpio/mpc8xxx: change irq handler from chained to
normal") switched mpc8xxx_probe() to devm_request_irq() with
IRQF_SHARED, but left mpc8xxx_remove() calling
irq_set_chained_handler_and_data(mpc8xxx_gc->irqn, NULL, NULL). On
unbind, this tears down the shared interrupt descriptor, disrupts other
sharers, and causes devres __free_irq() to warn and skip IRQ
synchronisation.
Remove mpc8xxx_remove(), letting devres LIFO teardown free and
synchronise the shared IRQ before removing the GPIO chip and IRQ
domain.
Fixes: 698b8eeaed72 ("gpio/mpc8xxx: change irq handler from chained to normal")
Closes: https://sashiko.dev/#/bug/linux-0a7973a1-38dd-4b19-9120-a3aa08d02cda
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
---
drivers/gpio/gpio-mpc8xxx.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
index 312250deb763..bcc7e2e739e3 100644
--- a/drivers/gpio/gpio-mpc8xxx.c
+++ b/drivers/gpio/gpio-mpc8xxx.c
@@ -460,14 +460,6 @@ static int mpc8xxx_probe(struct platform_device *pdev)
return 0;
}
-static void mpc8xxx_remove(struct platform_device *pdev)
-{
- struct mpc8xxx_gpio_chip *mpc8xxx_gc = platform_get_drvdata(pdev);
-
- if (mpc8xxx_gc->irq)
- irq_set_chained_handler_and_data(mpc8xxx_gc->irqn, NULL, NULL);
-}
-
static int mpc8xxx_suspend(struct device *dev)
{
struct mpc8xxx_gpio_chip *mpc8xxx_gc = dev_get_drvdata(dev);
@@ -501,7 +493,6 @@ MODULE_DEVICE_TABLE(acpi, gpio_acpi_ids);
static struct platform_driver mpc8xxx_plat_driver = {
.probe = mpc8xxx_probe,
- .remove = mpc8xxx_remove,
.driver = {
.name = "gpio-mpc8xxx",
.of_match_table = mpc8xxx_gpio_ids,
--
2.56.1.911.g883d8bcb20-goog