Commit 4eac57ac authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Luis Henriques

Revert "i2c: core: Dispose OF IRQ mapping at client removal time"

commit a4944572 upstream.

This reverts commit e4df3a0b
("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: default avatarJakub Kicinski <kubakici@wp.pl>
Reported-by: default avatarSébastien Szymanski <sebastien.szymanski@armadeus.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
[wsa: updated the commit message with findings fromt the other bug report]
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Fixes: e4df3a0b
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 1cb4aca7
......@@ -297,9 +297,6 @@ static int i2c_device_remove(struct device *dev)
status = driver->remove(client);
}
if (dev->of_node)
irq_dispose_mapping(client->irq);
acpi_dev_pm_detach(&client->dev, true);
return status;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment