linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bastian Hecht <hechtb@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 3/5] i2c: exynos5: Remove suspension check
Date: Thu, 17 Jul 2014 14:48:38 +0000	[thread overview]
Message-ID: <1405608520-5644-3-git-send-email-hechtb@gmail.com> (raw)
In-Reply-To: <1405608520-5644-1-git-send-email-hechtb@gmail.com>

We now take care of suspension in the i2c core code. So we can remove this
check here.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
---
same as v1

 drivers/i2c/busses/i2c-exynos5.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 63d2292..a80cf28 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -145,7 +145,6 @@
 
 struct exynos5_i2c {
 	struct i2c_adapter	adap;
-	unsigned int		suspended:1;
 
 	struct i2c_msg		*msg;
 	struct completion	msg_complete;
@@ -610,11 +609,6 @@ static int exynos5_i2c_xfer(struct i2c_adapter *adap,
 	struct exynos5_i2c *i2c = adap->algo_data;
 	int i = 0, ret = 0, stop = 0;
 
-	if (i2c->suspended) {
-		dev_err(i2c->dev, "HS-I2C is not initialized.\n");
-		return -EIO;
-	}
-
 	clk_prepare_enable(i2c->clk);
 
 	for (i = 0; i < num; i++, msgs++) {
@@ -757,16 +751,6 @@ static int exynos5_i2c_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM_SLEEP
-static int exynos5_i2c_suspend_noirq(struct device *dev)
-{
-	struct platform_device *pdev = to_platform_device(dev);
-	struct exynos5_i2c *i2c = platform_get_drvdata(pdev);
-
-	i2c->suspended = 1;
-
-	return 0;
-}
-
 static int exynos5_i2c_resume_noirq(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -783,14 +767,12 @@ static int exynos5_i2c_resume_noirq(struct device *dev)
 
 	exynos5_i2c_init(i2c);
 	clk_disable_unprepare(i2c->clk);
-	i2c->suspended = 0;
 
 	return 0;
 }
 #endif
 
-static SIMPLE_DEV_PM_OPS(exynos5_i2c_dev_pm_ops, exynos5_i2c_suspend_noirq,
-			 exynos5_i2c_resume_noirq);
+static SIMPLE_DEV_PM_OPS(exynos5_i2c_dev_pm_ops, exynos5_i2c_resume_noirq);
 
 static struct platform_driver exynos5_i2c_driver = {
 	.probe		= exynos5_i2c_probe,
-- 
1.9.1


  parent reply	other threads:[~2014-07-17 14:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 14:48 [PATCH v2 1/5] i2c: Don't start transfers when suspended Bastian Hecht
2014-07-17 14:48 ` [PATCH v2 2/5] i2c: eg20t: Remove suspension check Bastian Hecht
2014-07-17 14:48 ` Bastian Hecht [this message]
2014-07-17 16:54   ` [PATCH v3 3/5] i2c: exynos5: " Bastian Hecht
2014-07-17 14:48 ` [PATCH v2 4/5] i2c: sc3c2410: " Bastian Hecht
2014-07-17 14:48 ` [PATCH v2 5/5] i2c: tegra: " Bastian Hecht
2014-07-17 14:59   ` Thierry Reding
2014-07-17 16:52     ` Bastian Hecht
2014-07-17 14:58 ` [PATCH v2 1/5] i2c: Don't start transfers when suspended Bastian Hecht
2014-07-17 15:09   ` Wolfram Sang
2014-07-22 18:01 ` Grygorii Strashko
2014-07-22 21:20   ` Russell King - ARM Linux
2014-09-19 17:18 ` Wolfram Sang

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=1405608520-5644-3-git-send-email-hechtb@gmail.com \
    --to=hechtb@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).