提交 817315f5 编写于 作者: P Philippe Begnic 提交者: Wolfram Sang

i2c-nomadik: Fixup clock handling

Make sure to clk_prepare as well as clk_enable.
Signed-off-by: NPhilippe Begnic <philippe.begnic@stericsson.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
上级 82fa63bd
...@@ -644,7 +644,11 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap, ...@@ -644,7 +644,11 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap,
pm_runtime_get_sync(&dev->adev->dev); pm_runtime_get_sync(&dev->adev->dev);
clk_enable(dev->clk); status = clk_prepare_enable(dev->clk);
if (status) {
dev_err(&dev->adev->dev, "can't prepare_enable clock\n");
goto out_clk;
}
status = init_hw(dev); status = init_hw(dev);
if (status) if (status)
...@@ -671,7 +675,8 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap, ...@@ -671,7 +675,8 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap,
} }
out: out:
clk_disable(dev->clk); clk_disable_unprepare(dev->clk);
out_clk:
pm_runtime_put_sync(&dev->adev->dev); pm_runtime_put_sync(&dev->adev->dev);
dev->busy = false; dev->busy = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册