Re: [PATCH 2/3] i2c: core: Dispose OF IRQ mapping at client removal time
On Thu, Oct 30, 2014 at 03:59:37PM +0200, Laurent Pinchart wrote: 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+rene...@ideasonboard.com Added stable and applied to for-current, thanks! signature.asc Description: Digital signature
[PATCH 2/3] 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+rene...@ideasonboard.com --- drivers/i2c/i2c-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 2f90ac6a7f79..258765b29684 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -670,6 +670,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; } -- 2.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] i2c: core: Dispose OF IRQ mapping at client removal time
On Thu, Oct 30, 2014 at 03:59:37PM +0200, Laurent Pinchart wrote: 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+rene...@ideasonboard.com --- drivers/i2c/i2c-core.c | 3 +++ 1 file changed, 3 insertions(+) If this is needed regardless of patch 3/3, then presumably it should be Cc'ed to sta...@vger.kernel.org since it fixes a bug that's been there for quite some time? Thierry diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 2f90ac6a7f79..258765b29684 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -670,6 +670,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; } -- 2.0.4 pgpGJit6SlVaB.pgp Description: PGP signature