From patchwork Mon Aug 5 22:02:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Etheridge, Darren" X-Patchwork-Id: 2839045 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C292F9F3B9 for ; Mon, 5 Aug 2013 22:06:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C216120438 for ; Mon, 5 Aug 2013 22:06:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B118A20431 for ; Mon, 5 Aug 2013 22:06:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754738Ab3HEWF7 (ORCPT ); Mon, 5 Aug 2013 18:05:59 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:44925 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755240Ab3HEWFz (ORCPT ); Mon, 5 Aug 2013 18:05:55 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r75M5qdh004069; Mon, 5 Aug 2013 17:05:52 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r75M5qYh031728; Mon, 5 Aug 2013 17:05:52 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Mon, 5 Aug 2013 17:05:52 -0500 Received: from localhost.localdomain (sdit-build03.sc.ti.com [128.247.24.118]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r75M5lDU024475; Mon, 5 Aug 2013 17:05:52 -0500 From: Darren Etheridge To: , , , , CC: Subject: [PATCH v3 18/20] video: da8xx-fb: make clock naming consistent Date: Mon, 5 Aug 2013 17:02:37 -0500 Message-ID: <1375740159-1045-19-git-send-email-detheridge@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1375740159-1045-1-git-send-email-detheridge@ti.com> References: <1375740159-1045-1-git-send-email-detheridge@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clean up the code, so that the names of the various clock variables are consistent to it is clear what variable is associated with what clock. Signed-off-by: Darren Etheridge --- drivers/video/da8xx-fb.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index dfe7572..8c0ca11 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -177,7 +177,7 @@ struct da8xx_fb_par { #ifdef CONFIG_CPU_FREQ struct notifier_block freq_transition; #endif - unsigned int lcd_fck_rate; + unsigned int lcdc_clk_rate; void (*panel_power_ctrl)(int); u32 pseudo_palette[16]; struct fb_videomode mode; @@ -693,7 +693,7 @@ static int da8xx_fb_config_clk_divider(struct da8xx_fb_par *par, { int ret; - if (par->lcd_fck_rate != lcdc_clk_rate) { + if (par->lcdc_clk_rate != lcdc_clk_rate) { ret = clk_set_rate(par->lcdc_clk, lcdc_clk_rate); if (IS_ERR_VALUE(ret)) { dev_err(par->dev, @@ -701,7 +701,7 @@ static int da8xx_fb_config_clk_divider(struct da8xx_fb_par *par, lcdc_clk_rate); return ret; } - par->lcd_fck_rate = clk_get_rate(par->lcdc_clk); + par->lcdc_clk_rate = clk_get_rate(par->lcdc_clk); } /* Configure the LCD clock divisor. */ @@ -723,7 +723,7 @@ static unsigned int da8xx_fb_calc_clk_divider(struct da8xx_fb_par *par, pixclock = PICOS2KHZ(pixclock) * 1000; - *lcdc_clk_rate = par->lcd_fck_rate; + *lcdc_clk_rate = par->lcdc_clk_rate; if (pixclock < (*lcdc_clk_rate / CLK_MAX_DIV)) { *lcdc_clk_rate = clk_round_rate(par->lcdc_clk, @@ -1031,8 +1031,8 @@ static int lcd_da8xx_cpufreq_transition(struct notifier_block *nb, par = container_of(nb, struct da8xx_fb_par, freq_transition); if (val == CPUFREQ_POSTCHANGE) { - if (par->lcd_fck_rate != clk_get_rate(par->lcdc_clk)) { - par->lcd_fck_rate = clk_get_rate(par->lcdc_clk); + if (par->lcdc_clk_rate != clk_get_rate(par->lcdc_clk)) { + par->lcdc_clk_rate = clk_get_rate(par->lcdc_clk); lcd_disable_raster(DA8XX_FRAME_WAIT); da8xx_fb_calc_config_clk_divider(par, &par->mode); if (par->blank == FB_BLANK_UNBLANK) @@ -1327,8 +1327,8 @@ static int fb_probe(struct platform_device *device) struct lcd_ctrl_config *lcd_cfg; struct fb_videomode *lcdc_info; struct fb_info *da8xx_fb_info; - struct clk *fb_clk = NULL; struct da8xx_fb_par *par; + struct clk *tmp_lcdc_clk; int ret; unsigned long ulcm; @@ -1346,10 +1346,10 @@ static int fb_probe(struct platform_device *device) if (IS_ERR(da8xx_fb_reg_base)) return PTR_ERR(da8xx_fb_reg_base); - fb_clk = devm_clk_get(&device->dev, "fck"); - if (IS_ERR(fb_clk)) { + tmp_lcdc_clk = devm_clk_get(&device->dev, "fck"); + if (IS_ERR(tmp_lcdc_clk)) { dev_err(&device->dev, "Can not get device clock\n"); - return PTR_ERR(fb_clk); + return PTR_ERR(tmp_lcdc_clk); } pm_runtime_enable(&device->dev); @@ -1389,8 +1389,8 @@ static int fb_probe(struct platform_device *device) par = da8xx_fb_info->par; par->dev = &device->dev; - par->lcdc_clk = fb_clk; - par->lcd_fck_rate = clk_get_rate(fb_clk); + par->lcdc_clk = tmp_lcdc_clk; + par->lcdc_clk_rate = clk_get_rate(par->lcdc_clk); if (fb_pdata->panel_power_ctrl) { par->panel_power_ctrl = fb_pdata->panel_power_ctrl; par->panel_power_ctrl(1);