From: Shubhrajyoti D <shubhrajyoti@ti.com>
To: linux-omap@vger.kernel.org
Cc: khilman@ti.com, Rajendra Nayak <rnayak@ti.com>,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Shubhrajyoti D <shubhrajyoti@ti.com>
Subject: [PATCH RFC] OMAP: I2C: Fix the mismatch of pm_runtime enable and disable
Date: Wed, 11 Jan 2012 18:51:44 +0530 [thread overview]
Message-ID: <1326288104-10544-1-git-send-email-shubhrajyoti@ti.com> (raw)
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.Attempting to fix the same by calling
pm_runtime_disable in the error and the remove path.
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
drivers/i2c/busses/i2c-omap.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 12d402c..abc7b5b 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1070,6 +1070,7 @@ err_unuse_clocks:
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
pm_runtime_put(dev->dev);
iounmap(dev->base);
+ pm_runtime_disable(&pdev->dev);
err_free_mem:
platform_set_drvdata(pdev, NULL);
kfree(dev);
@@ -1085,6 +1086,7 @@ omap_i2c_remove(struct platform_device *pdev)
struct omap_i2c_dev *dev = platform_get_drvdata(pdev);
struct resource *mem;
+ pm_runtime_disable(&pdev->dev);
platform_set_drvdata(pdev, NULL);
free_irq(dev->irq, dev);
--
1.7.1
next reply other threads:[~2012-01-11 13:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 13:21 Shubhrajyoti D [this message]
2012-01-11 13:59 ` [PATCH RFC] OMAP: I2C: Fix the mismatch of pm_runtime enable and disable Grazvydas Ignotas
2012-01-11 14:25 ` Shubhrajyoti
[not found] ` <4F0D9BE1.6070209-l0cyMroinI0@public.gmane.org>
2012-01-12 15:24 ` Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326288104-10544-1-git-send-email-shubhrajyoti@ti.com \
--to=shubhrajyoti@ti.com \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rnayak@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox