Skip to content

Commit

Permalink
i2c: core: Dispose OF IRQ mapping at client removal time
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Laurent Pinchart authored and Wolfram Sang committed Nov 7, 2014
1 parent 11cfbfb commit e4df3a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e4df3a0

Please sign in to comment.