提交 91701ae8 编写于 作者: W Wolfram Sang 提交者: Wolfram Sang

i2c: sh_mobile: let RuntimePM do the clock handling

No need to do it manually.
Reported-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: NJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 a4d16493
......@@ -702,7 +702,6 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
/* Wake up device and enable clock */
pm_runtime_get_sync(pd->dev);
clk_prepare_enable(pd->clk);
/* Process all messages */
for (i = 0; i < num; i++) {
......@@ -743,7 +742,6 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
iic_wr(pd, ICCR, 0);
/* Disable clock and mark device as idle */
clk_disable_unprepare(pd->clk);
pm_runtime_put_sync(pd->dev);
return err ?: num;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册