linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OMAP: I2C: add devexit to the remove code
@ 2011-12-20  7:25 Shubhrajyoti D
       [not found] ` <1324365959-4143-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Shubhrajyoti D @ 2011-12-20  7:25 UTC (permalink / raw)
  To: linux-omap; +Cc: linux-i2c, linux-arm-kernel, ben-linux, Shubhrajyoti D

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

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
 drivers/i2c/busses/i2c-omap.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index fa23faa..2efdc6b 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -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,
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-10  6:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20  7:25 [PATCH] OMAP: I2C: add devexit to the remove code Shubhrajyoti D
     [not found] ` <1324365959-4143-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-01-06 16:28   ` Ben Dooks
     [not found]     ` <20120106162820.GB8441-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2012-01-10  6:40       ` Datta, Shubhrajyoti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).