@@ -968,7 +968,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
/* find the clock and enable it */
i2c->dev = &pdev->dev;
- i2c->clk = clk_get(&pdev->dev, "i2c");
+ i2c->clk = devm_clk_get(&pdev->dev, "i2c");
if (IS_ERR(i2c->clk)) {
dev_err(&pdev->dev, "cannot get clock\n");
return -ENOENT;
@@ -1082,7 +1082,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
err_clk:
clk_disable_unprepare(i2c->clk);
- clk_put(i2c->clk);
return ret;
}
@@ -1104,7 +1103,6 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev)
free_irq(i2c->irq, i2c);
clk_disable_unprepare(i2c->clk);
- clk_put(i2c->clk);
iounmap(i2c->regs);
Signed-off-by: Tushar Behera <tushar.behera@linaro.org> --- drivers/i2c/busses/i2c-s3c2410.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)