diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2014-10-30 13:59:37 (GMT) |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-11-07 18:03:18 (GMT) |
commit | e4df3a0b62285130ac0a35cf07678c154ffb649d (patch) | |
tree | 7c9b514bc23c2c68c4258e9b8c17503cdd59892f /drivers | |
parent | 11cfbfb098b22d3e57f1f2be217cad20e2d48463 (diff) | |
download | linux-e4df3a0b62285130ac0a35cf07678c154ffb649d.tar.xz |
i2c: core: Dispose OF IRQ mapping at client removal time
Clients instantiated from OF get an IRQ mapping created at device
registration time. Dispose the mapping when the client is removed.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/i2c-core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 17a1853..f43b4e1 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -665,6 +665,9 @@ 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; } |