diff mbox

ARM: Samsung: ADC: Move to clk_prepare_enable/clk_disable_unprepare

Message ID 1404155288-2787-1-git-send-email-anarsoul@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vasily Khoruzhick June 30, 2014, 7:08 p.m. UTC
Use clk_prepare_enable/clk_disable_unprepare to make the driver
work properly with common clock framework.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 arch/arm/plat-samsung/adc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Tomasz Figa July 8, 2014, 11:49 a.m. UTC | #1
Hi Vasily,

On 30.06.2014 21:08, Vasily Khoruzhick wrote:
> Use clk_prepare_enable/clk_disable_unprepare to make the driver
> work properly with common clock framework.
> 
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> ---
>  arch/arm/plat-samsung/adc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Tomasz Figa <t.figa@samsung.com>

--
Best regards,
Tomasz
Kim Kukjin July 8, 2014, 2:17 p.m. UTC | #2
Tomasz Figa wrote:
> 
> Hi Vasily,
> 
> On 30.06.2014 21:08, Vasily Khoruzhick wrote:
> > Use clk_prepare_enable/clk_disable_unprepare to make the driver
> > work properly with common clock framework.
> >
> > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> > ---
> >  arch/arm/plat-samsung/adc.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
> 
Looks good to me, will apply.

Thanks,
Kukjin
diff mbox

Patch

diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index 79690f2..c5831b49 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -389,7 +389,7 @@  static int s3c_adc_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	clk_enable(adc->clk);
+	clk_prepare_enable(adc->clk);
 
 	tmp = adc->prescale | S3C2410_ADCCON_PRSCEN;
 
@@ -413,7 +413,7 @@  static int s3c_adc_remove(struct platform_device *pdev)
 {
 	struct adc_device *adc = platform_get_drvdata(pdev);
 
-	clk_disable(adc->clk);
+	clk_disable_unprepare(adc->clk);
 	regulator_disable(adc->vdd);
 
 	return 0;
@@ -436,7 +436,7 @@  static int s3c_adc_suspend(struct device *dev)
 
 	disable_irq(adc->irq);
 	spin_unlock_irqrestore(&adc->lock, flags);
-	clk_disable(adc->clk);
+	clk_disable_unprepare(adc->clk);
 	regulator_disable(adc->vdd);
 
 	return 0;
@@ -454,7 +454,7 @@  static int s3c_adc_resume(struct device *dev)
 	ret = regulator_enable(adc->vdd);
 	if (ret)
 		return ret;
-	clk_enable(adc->clk);
+	clk_prepare_enable(adc->clk);
 	enable_irq(adc->irq);
 
 	tmp = adc->prescale | S3C2410_ADCCON_PRSCEN;