From: Jakub Kicinski <[email protected]>
[ Upstream commit a49445727014216703a3c28ccee4cef36d41571e ]
This reverts commit e4df3a0b6228
("i2c: core: Dispose OF IRQ mapping at client removal time")
Calling irq_dispose_mapping() will destroy the mapping and disassociate
the IRQ from the IRQ chip to which it belongs. Keeping it is OK, because
existent mappings are reused properly.
Also, this commit breaks drivers using devm* for IRQ management on
OF-based systems because devm* cleanup happens in device code, after
bus's remove() method returns.
Signed-off-by: Jakub Kicinski <[email protected]>
Reported-by: Sébastien Szymanski <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
[wsa: updated the commit message with findings fromt the other bug report]
Signed-off-by: Wolfram Sang <[email protected]>
Cc: [email protected]
Fixes: e4df3a0b6228
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/i2c/i2c-core.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index f43b4e1..17a1853 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -665,9 +665,6 @@ static int i2c_device_remove(struct device *dev)
status = driver->remove(client);
}
- if (dev->of_node)
- irq_dispose_mapping(client->irq);
-
dev_pm_domain_detach(&client->dev, true);
return status;
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html