From patchwork Tue Oct 2 23:57:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 1539951 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9FC363FDAE for ; Wed, 3 Oct 2012 00:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932751Ab2JCAAe (ORCPT ); Tue, 2 Oct 2012 20:00:34 -0400 Received: from mail-da0-f46.google.com ([209.85.210.46]:35495 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932749Ab2JCAAc (ORCPT ); Tue, 2 Oct 2012 20:00:32 -0400 Received: by dakn41 with SMTP id n41so977637dak.19 for ; Tue, 02 Oct 2012 17:00:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=Ql46KSnGnepQoIY9Ziz9OMPUPhEoRbS6Y+YpT8P0OWQ=; b=WeZy7wO6/zwdJ4cI6BdrsR/yoqw14goCOapaZ+c8Hw2JF9r55kcIXgkdbs/j+OarbS L/OaMmtRIZ1IG2ArdPRGtfznrmt5EVY7wm5L+bV1VSRFuxSUB4nmm3asj3K0zUBM3kYK Ull33Gs4XiBjUK5tnSSfYewiWNHZUaZKEyaF24NInXkt3/fSf6D0DEGYkn8hwtZtoJNp 4d61rXNn68R1iC3TmeIxG+tRN3tDTRSF944fPY3sKPFMdJ3K4GFvGXPSy0GR/gKWDJZp oAJWmm1gcQIZsElSxw0Rb9bV2I0m4LhYn7R/KllA9WHW3MA92rBYMMGSzN2Ay+jksNtI pjYg== Received: by 10.66.82.101 with SMTP id h5mr917565pay.15.1349222431768; Tue, 02 Oct 2012 17:00:31 -0700 (PDT) Received: from localhost.localdomain ([121.168.7.175]) by mx.google.com with ESMTPS id bm8sm1462075pab.3.2012.10.02.17.00.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 17:00:30 -0700 (PDT) From: Thomas Abraham To: linux-fbdev@vger.kernel.org Cc: FlorianSchandinat@gmx.de, jg1.han@samsung.com, kgene.kim@samsung.com, linux-samsung-soc@vger.kernel.org Subject: [PATCH] video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare Date: Wed, 3 Oct 2012 08:57:40 +0900 Message-Id: <1349222260-3248-1-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQm7FIsN2k7j7rorlieWnA57gxT8BCaSQoHMC9qdXhdzy8fRz6r9MjrF38fSp0ReWtg0u9eF Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare calls as required by common clock framework. Signed-off-by: Thomas Abraham Acked-by: Jingoo Han --- drivers/video/s3c-fb.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 52b744f..2ed7b63 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c @@ -1404,7 +1404,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev) return PTR_ERR(sfb->bus_clk); } - clk_enable(sfb->bus_clk); + clk_prepare_enable(sfb->bus_clk); if (!sfb->variant.has_clksel) { sfb->lcd_clk = devm_clk_get(dev, "sclk_fimd"); @@ -1414,7 +1414,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev) goto err_bus_clk; } - clk_enable(sfb->lcd_clk); + clk_prepare_enable(sfb->lcd_clk); } pm_runtime_enable(sfb->dev); @@ -1504,10 +1504,10 @@ err_lcd_clk: pm_runtime_disable(sfb->dev); if (!sfb->variant.has_clksel) - clk_disable(sfb->lcd_clk); + clk_disable_unprepare(sfb->lcd_clk); err_bus_clk: - clk_disable(sfb->bus_clk); + clk_disable_unprepare(sfb->bus_clk); return ret; } @@ -1531,9 +1531,9 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev) s3c_fb_release_win(sfb, sfb->windows[win]); if (!sfb->variant.has_clksel) - clk_disable(sfb->lcd_clk); + clk_disable_unprepare(sfb->lcd_clk); - clk_disable(sfb->bus_clk); + clk_disable_unprepare(sfb->bus_clk); pm_runtime_put_sync(sfb->dev); pm_runtime_disable(sfb->dev); @@ -1561,9 +1561,9 @@ static int s3c_fb_suspend(struct device *dev) } if (!sfb->variant.has_clksel) - clk_disable(sfb->lcd_clk); + clk_disable_unprepare(sfb->lcd_clk); - clk_disable(sfb->bus_clk); + clk_disable_unprepare(sfb->bus_clk); pm_runtime_put_sync(sfb->dev); @@ -1581,10 +1581,10 @@ static int s3c_fb_resume(struct device *dev) pm_runtime_get_sync(sfb->dev); - clk_enable(sfb->bus_clk); + clk_prepare_enable(sfb->bus_clk); if (!sfb->variant.has_clksel) - clk_enable(sfb->lcd_clk); + clk_prepare_enable(sfb->lcd_clk); /* setup gpio and output polarity controls */ pd->setup_gpio(); @@ -1640,9 +1640,9 @@ static int s3c_fb_runtime_suspend(struct device *dev) struct s3c_fb *sfb = platform_get_drvdata(pdev); if (!sfb->variant.has_clksel) - clk_disable(sfb->lcd_clk); + clk_disable_unprepare(sfb->lcd_clk); - clk_disable(sfb->bus_clk); + clk_disable_unprepare(sfb->bus_clk); return 0; } @@ -1653,10 +1653,10 @@ static int s3c_fb_runtime_resume(struct device *dev) struct s3c_fb *sfb = platform_get_drvdata(pdev); struct s3c_fb_platdata *pd = sfb->pdata; - clk_enable(sfb->bus_clk); + clk_prepare_enable(sfb->bus_clk); if (!sfb->variant.has_clksel) - clk_enable(sfb->lcd_clk); + clk_prepare_enable(sfb->lcd_clk); /* setup gpio and output polarity controls */ pd->setup_gpio();