diff options
author | Thomas Abraham <thomas.abraham@linaro.org> | 2012-10-02 19:26:39 -0400 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-10-06 09:57:25 -0400 |
commit | d3b64c59341ac88b37a4474f8dee86b0d37accca (patch) | |
tree | ae8aec9f99f020501195c53b4fa7c4dcc812a2ba /drivers/i2c | |
parent | 3db11feffc1ad2ab9dea27789e6b5b3032827adc (diff) |
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-s3c2410.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 5ae3b0236bd3..59cfcb45691a 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c | |||
@@ -601,14 +601,14 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap, | |||
601 | int ret; | 601 | int ret; |
602 | 602 | ||
603 | pm_runtime_get_sync(&adap->dev); | 603 | pm_runtime_get_sync(&adap->dev); |
604 | clk_enable(i2c->clk); | 604 | clk_prepare_enable(i2c->clk); |
605 | 605 | ||
606 | for (retry = 0; retry < adap->retries; retry++) { | 606 | for (retry = 0; retry < adap->retries; retry++) { |
607 | 607 | ||
608 | ret = s3c24xx_i2c_doxfer(i2c, msgs, num); | 608 | ret = s3c24xx_i2c_doxfer(i2c, msgs, num); |
609 | 609 | ||
610 | if (ret != -EAGAIN) { | 610 | if (ret != -EAGAIN) { |
611 | clk_disable(i2c->clk); | 611 | clk_disable_unprepare(i2c->clk); |
612 | pm_runtime_put(&adap->dev); | 612 | pm_runtime_put(&adap->dev); |
613 | return ret; | 613 | return ret; |
614 | } | 614 | } |
@@ -618,7 +618,7 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap, | |||
618 | udelay(100); | 618 | udelay(100); |
619 | } | 619 | } |
620 | 620 | ||
621 | clk_disable(i2c->clk); | 621 | clk_disable_unprepare(i2c->clk); |
622 | pm_runtime_put(&adap->dev); | 622 | pm_runtime_put(&adap->dev); |
623 | return -EREMOTEIO; | 623 | return -EREMOTEIO; |
624 | } | 624 | } |
@@ -977,7 +977,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) | |||
977 | 977 | ||
978 | dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk); | 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 | /* map the registers */ | 982 | /* map the registers */ |
983 | 983 | ||
@@ -1065,7 +1065,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) | |||
1065 | pm_runtime_enable(&i2c->adap.dev); | 1065 | pm_runtime_enable(&i2c->adap.dev); |
1066 | 1066 | ||
1067 | dev_info(&pdev->dev, "%s: S3C I2C adapter\n", dev_name(&i2c->adap.dev)); | 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 | return 0; | 1069 | return 0; |
1070 | 1070 | ||
1071 | err_cpufreq: | 1071 | err_cpufreq: |
@@ -1082,7 +1082,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) | |||
1082 | kfree(i2c->ioarea); | 1082 | kfree(i2c->ioarea); |
1083 | 1083 | ||
1084 | err_clk: | 1084 | err_clk: |
1085 | clk_disable(i2c->clk); | 1085 | clk_disable_unprepare(i2c->clk); |
1086 | clk_put(i2c->clk); | 1086 | clk_put(i2c->clk); |
1087 | 1087 | ||
1088 | err_noclk: | 1088 | err_noclk: |
@@ -1106,7 +1106,7 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev) | |||
1106 | i2c_del_adapter(&i2c->adap); | 1106 | i2c_del_adapter(&i2c->adap); |
1107 | free_irq(i2c->irq, i2c); | 1107 | free_irq(i2c->irq, i2c); |
1108 | 1108 | ||
1109 | clk_disable(i2c->clk); | 1109 | clk_disable_unprepare(i2c->clk); |
1110 | clk_put(i2c->clk); | 1110 | clk_put(i2c->clk); |
1111 | 1111 | ||
1112 | iounmap(i2c->regs); | 1112 | iounmap(i2c->regs); |
@@ -1135,9 +1135,9 @@ static int s3c24xx_i2c_resume(struct device *dev) | |||
1135 | struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev); | 1135 | struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev); |
1136 | 1136 | ||
1137 | i2c->suspended = 0; | 1137 | i2c->suspended = 0; |
1138 | clk_enable(i2c->clk); | 1138 | clk_prepare_enable(i2c->clk); |
1139 | s3c24xx_i2c_init(i2c); | 1139 | s3c24xx_i2c_init(i2c); |
1140 | clk_disable(i2c->clk); | 1140 | clk_disable_unprepare(i2c->clk); |
1141 | 1141 | ||
1142 | return 0; | 1142 | return 0; |
1143 | } | 1143 | } |