From patchwork Fri Sep 13 12:59:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2885061 Return-Path: X-Original-To: patchwork-linux-arm@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 3E1A39F1E3 for ; Fri, 13 Sep 2013 13:11:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93644202E5 for ; Fri, 13 Sep 2013 13:11:41 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4205A20114 for ; Fri, 13 Sep 2013 13:11:40 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKT9t-0007s6-Mi; Fri, 13 Sep 2013 13:11:37 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKT9r-0006SI-Hn; Fri, 13 Sep 2013 13:11:35 +0000 Received: from mail-pd0-f173.google.com ([209.85.192.173]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKT64-0005oq-HT for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2013 13:07:41 +0000 Received: by mail-pd0-f173.google.com with SMTP id p10so1229959pdj.4 for ; Fri, 13 Sep 2013 06:07:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=kDI3225jevVdlnygbrKukf4F+D69JQv47N+qh3Zo7EY=; b=MnRmfhwDNn/DdX1wt34FdB9L9LUD68TRzFliLPofCIIbNaXqypwrGPH9NqcHgnedDR igCAc+cTUTMCGPp+Nt6DNaluROUK/PHRzubK0OpBPJdR9fKZ7p6xV2r7IZC/F43LiJ5s 7h4qh9ut8qoP/8TgmgvkO6cRSrYJUEyvuducNBsbyXD8rUDlPf9S4ke7cAWQZ3NJ7SQa m+D5iIlBkobfbqhYUCaZ5oN3l3VoufwES1hScp16rOhMsMVwoCl8sZKHa1R+CWtqhy5P PplOdrooImngogChSLaPlBsH5C4nl8szbAPkGo2t1VVg2jj1xyK2MwYPq1xhGxFvxrpF 3KCQ== X-Gm-Message-State: ALoCoQnzvTb99hzk18Pzh9Nb3Kyf6pEZ15MgxRLuJkrsAayVlIbJs/vEo4sQ5w2KHocQyRlF8Ysh X-Received: by 10.66.144.73 with SMTP id sk9mr1977646pab.172.1379077639011; Fri, 13 Sep 2013 06:07:19 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id py4sm11672192pbc.14.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:07:18 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 036/228] cpufreq: s3cx4xx: use cpufreq_table_validate_and_show() Date: Fri, 13 Sep 2013 18:29:42 +0530 Message-Id: <9ddc49beb2de6aeadf36340ca3ce909ff06a7952.1379063063.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130913_090740_696549_F14F857F X-CRM114-Status: GOOD ( 11.21 ) X-Spam-Score: -1.9 (-) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, Kukjin Kim , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Lets use cpufreq_table_validate_and_show() instead of calling cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr(). Cc: Kukjin Kim Signed-off-by: Viresh Kumar --- drivers/cpufreq/s3c2416-cpufreq.c | 4 +--- drivers/cpufreq/s3c24xx-cpufreq.c | 6 ++---- drivers/cpufreq/s3c64xx-cpufreq.c | 5 +---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/cpufreq/s3c2416-cpufreq.c b/drivers/cpufreq/s3c2416-cpufreq.c index 22dcb81..a7a4c61 100644 --- a/drivers/cpufreq/s3c2416-cpufreq.c +++ b/drivers/cpufreq/s3c2416-cpufreq.c @@ -494,12 +494,10 @@ static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = (500 * 1000) + s3c_freq->regulator_latency; - ret = cpufreq_frequency_table_cpuinfo(policy, s3c_freq->freq_table); + ret = cpufreq_table_validate_and_show(policy, s3c_freq->freq_table); if (ret) goto err_freq_table; - cpufreq_frequency_table_get_attr(s3c_freq->freq_table, 0); - register_reboot_notifier(&s3c2416_cpufreq_reboot_notifier); return 0; diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c index f2c872c..73856d1 100644 --- a/drivers/cpufreq/s3c24xx-cpufreq.c +++ b/drivers/cpufreq/s3c24xx-cpufreq.c @@ -386,10 +386,8 @@ static int s3c_cpufreq_init(struct cpufreq_policy *policy) /* feed the latency information from the cpu driver */ policy->cpuinfo.transition_latency = cpu_cur.info->latency; - if (ftab) { - cpufreq_frequency_table_cpuinfo(policy, ftab); - cpufreq_frequency_table_get_attr(ftab, policy->cpu); - } + if (ftab) + return cpufreq_table_validate_and_show(policy, ftab); return 0; } diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c index 9024043..872f74d 100644 --- a/drivers/cpufreq/s3c64xx-cpufreq.c +++ b/drivers/cpufreq/s3c64xx-cpufreq.c @@ -251,15 +251,12 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy) */ policy->cpuinfo.transition_latency = (500 * 1000) + regulator_latency; - ret = cpufreq_frequency_table_cpuinfo(policy, s3c64xx_freq_table); + ret = cpufreq_table_validate_and_show(policy, s3c64xx_freq_table); if (ret != 0) { pr_err("Failed to configure frequency table: %d\n", ret); regulator_put(vddarm); clk_put(armclk); - } else { - cpufreq_frequency_table_get_attr(s3c64xx_freq_table, - policy->cpu); } return ret;