Commit e4df3a0b62285130ac0a35cf07678c154ffb649d

Authored by Laurent Pinchart
Committed by Wolfram Sang
1 parent 11cfbfb098

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

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

drivers/i2c/i2c-core.c
... ... @@ -665,6 +665,9 @@
665 665 status = driver->remove(client);
666 666 }
667 667  
  668 + if (dev->of_node)
  669 + irq_dispose_mapping(client->irq);
  670 +
668 671 dev_pm_domain_detach(&client->dev, true);
669 672 return status;
670 673 }