Skip to content

Commit

Permalink
Revert "i2c: core: Dispose OF IRQ mapping at client removal time"
Browse files Browse the repository at this point in the history
This reverts commit e4df3a0
("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>
Cc: stable@kernel.org
Fixes: e4df3a0
  • Loading branch information
Jakub Kicinski authored and Wolfram Sang committed Mar 12, 2015
1 parent 9eccca0 commit a494457
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a494457

Please sign in to comment.