Skip to contentSkip to conversation

i2c-s3c2410: Use plain pm_runtime_put()

PATCH In review Mark Brown 2 participants 2 messages Jun 28, 2012 – Jun 29, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 i2c-s3c2410: Use plain pm_runtime_put()

There's no point in using _sync() as we don't really care if the suspend has completed immediately.

---
 drivers/i2c/busses/i2c-s3c2410.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-s3c2410.c +2 -2
index ddd5797..c4a4494 100644
@@ -608,7 +608,7 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap,
 
 		if (ret != -EAGAIN) {
 			clk_disable(i2c->clk);
-			pm_runtime_put_sync(&adap->dev);
+			pm_runtime_put(&adap->dev);
 			return ret;
 		}
 
@@ -618,7 +618,7 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap,
 	}
 
 	clk_disable(i2c->clk);
-	pm_runtime_put_sync(&adap->dev);
+	pm_runtime_put(&adap->dev);
 	return -EREMOTEIO;
 }
 
Signature · 1 line
1.7.10
Reviewed-by Shubhrajyoti D on v1 1/1
#1 lore raw

Hi Mark,

Quoted 2 lines · Mark Brown

There's no point in using _sync() as we don't really care if the suspend has completed immediately.

Agree.

Quoted 11 lines

---
 drivers/i2c/busses/i2c-s3c2410.c |    4 ++--

 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-s3c2410.c +0 -0
index ddd5797..c4a4494 100644

drivers/i2c/busses/i2c-s3c2410.c static int s3c24xx_i2c_xfer(struct i2c_adapter *adap, · line 611

Quoted 5 lines
drivers/i2c/busses/i2c-s3c2410.c +1 -1
@@ -608,7 +608,7 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap,
 
                if (ret != -EAGAIN) {
                        clk_disable(i2c->clk);
-                       pm_runtime_put_sync(&adap->dev);
+                       pm_runtime_put(&adap->dev);

Especially if we are retrying in 100us :-)

Quoted 19 lines
drivers/i2c/busses/i2c-s3c2410.c +1 -2
                        return ret;
                }
 
@@ -618,7 +618,7 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap,
        }
 
        clk_disable(i2c->clk);
-       pm_runtime_put_sync(&adap->dev);
+       pm_runtime_put(&adap->dev);
        return -EREMOTEIO;
  }
 
--

1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html