From: Sergiy Kibrik Date: Mon, 27 Apr 2015 05:29:44 +0000 (+0300) Subject: ARM: SAMSUNG: fix clk_enable() WARNing in S3C24XX ADC X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0c5f989f1fde27df3ddb7ffd84525b4b64eb179c;p=linux-beck.git ARM: SAMSUNG: fix clk_enable() WARNing in S3C24XX ADC Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare calls as required by common clock framework. Removes this warning on probe: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:889 __clk_enable+0x28/0x9c() Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 3.19.0+ #46 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (warn_slowpath_common+0x7c/0xa4) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x18/0x20) [] (warn_slowpath_null) from [] (__clk_enable+0x28/0x9c) [] (__clk_enable) from [] (clk_enable+0x18/0x2c) [] (clk_enable) from [] (s3c_adc_probe+0x11c/0x18c) [] (s3c_adc_probe) from [] (platform_drv_probe+0x30/0x78) [] (platform_drv_probe) from [] (driver_probe_device+0xb0/0x1fc) [] (driver_probe_device) from [] (__driver_attach+0x68/0x88) [] (__driver_attach) from [] (bus_for_each_dev+0x70/0x94) [] (bus_for_each_dev) from [] (bus_add_driver+0xdc/0x1c4) [] (bus_add_driver) from [] (driver_register+0x9c/0xe0) [] (driver_register) from [] (adc_init+0x10/0x34) [] (adc_init) from [] (do_one_initcall+0x110/0x1cc) [] (do_one_initcall) from [] (kernel_init_freeable+0xf4/0x1ac) [] (kernel_init_freeable) from [] (kernel_init+0x8/0xe0) [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) ---[ end trace f4a1ea39a114fecf ]--- Signed-off-by: Sergiy Kibrik Reviewed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index e2be70df06c6..38444b94ac42 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;