aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShubhrajyoti D <shubhrajyoti@ti.com>2012-05-29 06:56:14 -0400
committerWolfram Sang <w.sang@pengutronix.de>2012-07-08 06:49:13 -0400
commit247405160093cf88cb59242f877543dd28e93df1 (patch)
tree0a8e57dda203ad3990598d49ceb230b1ca23584b
parent3dae3efb123f8b21df57f426c9c72d6ebcd83f8d (diff)
I2C: OMAP: Fix the mismatch of pm_runtime enable and disable
Currently the i2c driver calls the pm_runtime_enable and never the disable. This may cause a warning when pm_runtime_enable checks for the count match.Fix the same by calling pm_runtime_disable in the error and the remove path. Cc: Rajendra Nayak <rnayak@ti.com> Acked-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
-rw-r--r--drivers/i2c/busses/i2c-omap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 4f4188de325..c851672eb6a 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1090,6 +1090,7 @@ err_unuse_clocks:
1090 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0); 1090 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
1091 pm_runtime_put(dev->dev); 1091 pm_runtime_put(dev->dev);
1092 iounmap(dev->base); 1092 iounmap(dev->base);
1093 pm_runtime_disable(&pdev->dev);
1093err_free_mem: 1094err_free_mem:
1094 platform_set_drvdata(pdev, NULL); 1095 platform_set_drvdata(pdev, NULL);
1095 kfree(dev); 1096 kfree(dev);
@@ -1110,6 +1111,7 @@ omap_i2c_remove(struct platform_device *pdev)
1110 free_irq(dev->irq, dev); 1111 free_irq(dev->irq, dev);
1111 i2c_del_adapter(&dev->adapter); 1112 i2c_del_adapter(&dev->adapter);
1112 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0); 1113 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
1114 pm_runtime_disable(&pdev->dev);
1113 iounmap(dev->base); 1115 iounmap(dev->base);
1114 kfree(dev); 1116 kfree(dev);
1115 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1117 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);