[3.16.y-ckt stable] Patch "i2c: core: Dispose OF IRQ mapping at client removal time" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Mon Nov 17 11:15:37 UTC 2014


This is a note to let you know that I have just added a patch titled

    i2c: core: Dispose OF IRQ mapping at client removal time

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt2.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From fa379a7b13357cf9fadbf2dcb4837f161088b379 Mon Sep 17 00:00:00 2001
From: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>
Date: Thu, 30 Oct 2014 15:59:37 +0200
Subject: i2c: core: Dispose OF IRQ mapping at client removal time

commit e4df3a0b62285130ac0a35cf07678c154ffb649d upstream.

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 at ideasonboard.com>
Signed-off-by: Wolfram Sang <wsa at the-dreams.de>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.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 7c7f4b856bad..4716eb0bddcd 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -297,6 +297,9 @@ static int i2c_device_remove(struct device *dev)
 		status = driver->remove(client);
 	}

+	if (dev->of_node)
+		irq_dispose_mapping(client->irq);
+
 	acpi_dev_pm_detach(&client->dev, true);
 	return status;
 }
--
2.1.0





More information about the kernel-team mailing list