From: Laurent Pinchart Date: Thu, 30 Oct 2014 13:59:37 +0000 (+0200) Subject: i2c: core: Dispose OF IRQ mapping at client removal time X-Git-Tag: v3.18-rc4~9^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4df3a0b62285130ac0a35cf07678c154ffb649d;p=profile%2Fcommon%2Fplatform%2Fkernel%2Flinux-artik7.git 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 Signed-off-by: Wolfram Sang Cc: stable@kernel.org --- 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; }