mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
rk30: i2c: fix warning about clk_disable
This commit is contained in:
@@ -536,6 +536,8 @@ static int rk29_i2c_xfer(struct i2c_adapter *adap,
|
||||
int ret = 0;
|
||||
unsigned long scl_rate;
|
||||
|
||||
clk_enable(i2c->clk);
|
||||
|
||||
if(msgs[0].scl_rate <= 400000 && msgs[0].scl_rate >= 10000)
|
||||
scl_rate = msgs[0].scl_rate;
|
||||
else if(msgs[0].scl_rate > 400000){
|
||||
@@ -560,6 +562,7 @@ static int rk29_i2c_xfer(struct i2c_adapter *adap,
|
||||
rk29_i2c_disable_mport(i2c);
|
||||
if(i2c->is_div_from_arm[i2c->adap.nr])
|
||||
wake_unlock(&i2c->idlelock[i2c->adap.nr]);
|
||||
clk_disable(i2c->clk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,6 @@ static void rk30_i2c_init_hw(struct rk30_i2c *i2c, unsigned long scl_rate)
|
||||
{
|
||||
i2c->scl_rate = 0;
|
||||
rk30_i2c_set_clk(i2c, scl_rate);
|
||||
clk_disable(i2c->clk);
|
||||
return;
|
||||
}
|
||||
/* returns TRUE if we this is the last byte in the current message */
|
||||
|
||||
@@ -124,7 +124,7 @@ static int rk30_i2c_probe(struct platform_device *pdev)
|
||||
|
||||
i2c_dbg(&pdev->dev, "clock source %p\n", i2c->clk);
|
||||
|
||||
clk_enable(i2c->clk);
|
||||
//clk_enable(i2c->clk);
|
||||
|
||||
/* map the registers */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user