Skip to contentSkip to conversation

OMAP: I2C: add devexit to the remove code

PATCH New Shubhrajyoti D 2 participants 3 messages Dec 20, 2011 – Jan 10, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP: I2C: add devexit to the remove code

The omap_i2c_remove function may not be needed after device exit so the memory could be freed.

---
 drivers/i2c/busses/i2c-omap.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/i2c/busses/i2c-omap.c +2 -3
index fa23faa..2efdc6b 100644
@@ -1111,8 +1111,7 @@ err_release_region:
 	return r;
 }
 
-static int
-omap_i2c_remove(struct platform_device *pdev)
+static int __devexit omap_i2c_remove(struct platform_device *pdev)
 {
 	struct omap_i2c_dev	*dev = platform_get_drvdata(pdev);
 	struct resource		*mem;
@@ -1161,7 +1160,7 @@ static struct dev_pm_ops omap_i2c_pm_ops = {
 
 static struct platform_driver omap_i2c_driver = {
 	.probe		= omap_i2c_probe,
-	.remove		= omap_i2c_remove,
+	.remove		= __devexit_p(omap_i2c_remove),
 	.driver		= {
 		.name	= "omap_i2c",
 		.owner	= THIS_MODULE,
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 OMAP: I2C: add devexit to the remove code

Quoted 4 lines · Shubhrajyoti D

The omap_i2c_remove function may not be needed after device exit so the memory could be freed.

Will add this later.

Quoted 34 lines
---
 drivers/i2c/busses/i2c-omap.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/i2c/busses/i2c-omap.c +2 -3
index fa23faa..2efdc6b 100644
@@ -1111,8 +1111,7 @@ err_release_region:
 	return r;
 }
 
-static int
-omap_i2c_remove(struct platform_device *pdev)
+static int __devexit omap_i2c_remove(struct platform_device *pdev)
 {
 	struct omap_i2c_dev	*dev = platform_get_drvdata(pdev);
 	struct resource		*mem;
@@ -1161,7 +1160,7 @@ static struct dev_pm_ops omap_i2c_pm_ops = {
 
 static struct platform_driver omap_i2c_driver = {
 	.probe		= omap_i2c_probe,
-	.remove		= omap_i2c_remove,
+	.remove		= __devexit_p(omap_i2c_remove),
 	.driver		= {
 		.name	= "omap_i2c",
 		.owner	= THIS_MODULE,
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Ben Dooks, ben at fluff.org, http://www.fluff.org/ben/

Large Hadron Colada: A large Pina Colada that makes the universe disappear.
#2 lore raw

PATCH 1/1 OMAP: I2C: add devexit to the remove code

Quoted 7 lines · Ben Dooks
Quoted 4 lines · Shubhrajyoti D

The omap_i2c_remove function may not be needed after device exit so the memory could be freed.

Will add this later.

OK thanks.