summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Kicinski <kubakici@wp.pl>2015-03-11 18:35:36 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-26 13:59:45 +0100
commit15f3667aa26cb5884cb6a1b9d1ba069be440ee66 (patch)
treed7aa4b169dc969f8fd5045a87fa8f046720d3c8b
parent4b71a261c563ad9dc758ebe731b48a5d8317f73c (diff)
Revert "i2c: core: Dispose OF IRQ mapping at client removal time"
commit a49445727014216703a3c28ccee4cef36d41571e upstream. 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 <kubakici@wp.pl> Reported-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [wsa: updated the commit message with findings fromt the other bug report] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Fixes: e4df3a0b6228 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/i2c/i2c-core.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index e9eae57a2b50..63663332391d 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -679,9 +679,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;
}