Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: s3c2410: use clk_prepare_enable and clk_disable_unprepare

Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>

authored by

Thomas Abraham and committed by
Wolfram Sang
d3b64c59 3db11fef

+9 -9
+9 -9
drivers/i2c/busses/i2c-s3c2410.c
··· 601 601 int ret; 602 602 603 603 pm_runtime_get_sync(&adap->dev); 604 - clk_enable(i2c->clk); 604 + clk_prepare_enable(i2c->clk); 605 605 606 606 for (retry = 0; retry < adap->retries; retry++) { 607 607 608 608 ret = s3c24xx_i2c_doxfer(i2c, msgs, num); 609 609 610 610 if (ret != -EAGAIN) { 611 - clk_disable(i2c->clk); 611 + clk_disable_unprepare(i2c->clk); 612 612 pm_runtime_put(&adap->dev); 613 613 return ret; 614 614 } ··· 618 618 udelay(100); 619 619 } 620 620 621 - clk_disable(i2c->clk); 621 + clk_disable_unprepare(i2c->clk); 622 622 pm_runtime_put(&adap->dev); 623 623 return -EREMOTEIO; 624 624 } ··· 977 977 978 978 dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk); 979 979 980 - clk_enable(i2c->clk); 980 + clk_prepare_enable(i2c->clk); 981 981 982 982 /* map the registers */ 983 983 ··· 1065 1065 pm_runtime_enable(&i2c->adap.dev); 1066 1066 1067 1067 dev_info(&pdev->dev, "%s: S3C I2C adapter\n", dev_name(&i2c->adap.dev)); 1068 - clk_disable(i2c->clk); 1068 + clk_disable_unprepare(i2c->clk); 1069 1069 return 0; 1070 1070 1071 1071 err_cpufreq: ··· 1082 1082 kfree(i2c->ioarea); 1083 1083 1084 1084 err_clk: 1085 - clk_disable(i2c->clk); 1085 + clk_disable_unprepare(i2c->clk); 1086 1086 clk_put(i2c->clk); 1087 1087 1088 1088 err_noclk: ··· 1106 1106 i2c_del_adapter(&i2c->adap); 1107 1107 free_irq(i2c->irq, i2c); 1108 1108 1109 - clk_disable(i2c->clk); 1109 + clk_disable_unprepare(i2c->clk); 1110 1110 clk_put(i2c->clk); 1111 1111 1112 1112 iounmap(i2c->regs); ··· 1135 1135 struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev); 1136 1136 1137 1137 i2c->suspended = 0; 1138 - clk_enable(i2c->clk); 1138 + clk_prepare_enable(i2c->clk); 1139 1139 s3c24xx_i2c_init(i2c); 1140 - clk_disable(i2c->clk); 1140 + clk_disable_unprepare(i2c->clk); 1141 1141 1142 1142 return 0; 1143 1143 }