]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
i2c: omap: Annotate the remove code
authorShubhrajyoti D <shubhrajyoti@ti.com>
Thu, 28 Jun 2012 15:11:27 +0000 (20:41 +0530)
committerWolfram Sang <w.sang@pengutronix.de>
Thu, 12 Jul 2012 12:18:17 +0000 (14:18 +0200)
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>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
drivers/i2c/busses/i2c-omap.c

index 9895fa7e486e7b957dc1aa6253cfbbe599fab447..b086076060140f60405ea7f3bb895eaad079dd05 100644 (file)
@@ -1102,8 +1102,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;
@@ -1187,7 +1186,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,