From patchwork Thu Aug 8 13:48:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2841300 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 CA6149F271 for ; Thu, 8 Aug 2013 15:36:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C24120270 for ; Thu, 8 Aug 2013 15:36:23 +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 C64042026C for ; Thu, 8 Aug 2013 15:36:21 +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 1V7QgI-0006U5-2D; Thu, 08 Aug 2013 13:55:11 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qff-0004u3-NS; Thu, 08 Aug 2013 13:54:31 +0000 Received: from mail-pb0-f47.google.com ([209.85.160.47]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qdb-0004Zv-9o for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 13:52:24 +0000 Received: by mail-pb0-f47.google.com with SMTP id rr4so3216271pbb.20 for ; Thu, 08 Aug 2013 06:52:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=wVkf1ZhPYvP8s8RODelQfxjLNrHsQqXeFrg15Auzj54=; b=CFFOL7VHw/QDxUfulXUtgJL69WFRDG3yIPcTXccy7e4Y3fBvrAnCZphYB22mdXe3zA rtJ3TNv9qTWNK4BFkUia1uXEazryVGh+aObOD3M56ezekyjTAfNgqjjdBl/meytd287Y pKDhiBPVieP+OM82rGDwY5aAtYCSEAq20vNuDg9kIpQw6y+cGm+4tNov4FdeNP4yv9J3 91fEOSnSbaz55xtl3zxi4CWzQmtOWQyU1af9rLcjNGApRV0ZxzyHFEWGRCrqgndArWlU uryim/lrw1UCPbBPC/5b32zbad0UA2NZGZ6MjB+G1jVNylPwSeVXM1EDR+1pEGmrUQRP +gEg== X-Gm-Message-State: ALoCoQlwTb0FbIjVdfvekVafkmkeNVVGoUp4/h7EL5sVCEq/bAiImjeEtPpuGEmUtHfX9vey5/gC X-Received: by 10.66.118.129 with SMTP id km1mr5974653pab.127.1375969921748; Thu, 08 Aug 2013 06:52:01 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ot4sm16695757pac.17.2013.08.08.06.51.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:01 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 26/35] cpufreq: ppc: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:28 +0530 Message-Id: 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-20130808_095223_488152_A4605531 X-CRM114-Status: GOOD ( 11.33 ) X-Spam-Score: -2.6 (--) 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, 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=-4.2 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(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/ppc-corenet-cpufreq.c | 3 +-- drivers/cpufreq/ppc_cbe_cpufreq.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c index 60e81d5..5716b44 100644 --- a/drivers/cpufreq/ppc-corenet-cpufreq.c +++ b/drivers/cpufreq/ppc-corenet-cpufreq.c @@ -202,7 +202,7 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) table[i].frequency = CPUFREQ_TABLE_END; /* set the min and max frequency properly */ - ret = cpufreq_frequency_table_cpuinfo(policy, table); + ret = cpufreq_table_validate_and_show(policy, table); if (ret) { pr_err("invalid frequency table: %d\n", ret); goto err_nomem1; @@ -219,7 +219,6 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; policy->cur = corenet_cpufreq_get_speed(policy->cpu); - cpufreq_frequency_table_get_attr(table, cpu); of_node_put(np); return 0; diff --git a/drivers/cpufreq/ppc_cbe_cpufreq.c b/drivers/cpufreq/ppc_cbe_cpufreq.c index 2e448f0..6c5be63 100644 --- a/drivers/cpufreq/ppc_cbe_cpufreq.c +++ b/drivers/cpufreq/ppc_cbe_cpufreq.c @@ -123,11 +123,9 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu)); #endif - cpufreq_frequency_table_get_attr(cbe_freqs, policy->cpu); - /* this ensures that policy->cpuinfo_min * and policy->cpuinfo_max are set correctly */ - return cpufreq_frequency_table_cpuinfo(policy, cbe_freqs); + return cpufreq_table_validate_and_show(policy, cbe_freqs); } static int cbe_cpufreq_cpu_exit(struct cpufreq_policy *policy)