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: 18875 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 13FAB246A4 for ; Thu, 8 Aug 2013 13:52:05 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id m1sf3486572ves.2 for ; Thu, 08 Aug 2013 06:52:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=wVkf1ZhPYvP8s8RODelQfxjLNrHsQqXeFrg15Auzj54=; b=fyBGrD1AY+E9Kextyiq5bZllfael3QQLh+X+m/dafxial5EsoFhczIW9GNxAnL6h5t DLvvtw7bL7WN+jXxLZkC/Cb1L7rLemmjoTfm/hoYTfGuoGHBdUsYy/+nR/gihZIdb/i1 pZBjZ+phIWgO1bQVy8YgJswB0tlKIHORu+1lQ3tcBZYDwRkaHQecFK/Oj0OuGLLftO7g vpt0btHKTsOSpayzLURQwFDRl9SENFtENARkyl1mAHAcIOZMooUnM5iaaJxXhf3orSpE nZElG1/wg16Wy0DkuJi4Xfhj4VO/kQO6/KpBEp0DtJPMlFeB+cnBPjUmVgsktCqbhrrb G2+g== X-Received: by 10.236.144.130 with SMTP id n2mr1970863yhj.38.1375969924794; Thu, 08 Aug 2013 06:52:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.137 with SMTP id 9ls603473qee.37.gmail; Thu, 08 Aug 2013 06:52:04 -0700 (PDT) X-Received: by 10.221.44.136 with SMTP id ug8mr4068512vcb.13.1375969924686; Thu, 08 Aug 2013 06:52:04 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id rx10si3094264vdc.73.2013.08.08.06.52.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id gd11so122477vcb.33 for ; Thu, 08 Aug 2013 06:52:04 -0700 (PDT) X-Gm-Message-State: ALoCoQn+ZVn2765sh6ndUwABJLcN5jmvG034Eo+6sCfGv9TYGpjutHLzxl7JzCt7srr8FfIQI21U X-Received: by 10.58.6.210 with SMTP id d18mr3036316vea.96.1375969924584; Thu, 08 Aug 2013 06:52:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp16853vcz; Thu, 8 Aug 2013 06:52:04 -0700 (PDT) X-Received: by 10.66.191.226 with SMTP id hb2mr6299461pac.76.1375969923730; Thu, 08 Aug 2013 06:52:03 -0700 (PDT) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by mx.google.com with ESMTPS id i3si9733879pac.306.2013.08.08.06.52.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.43; Received: by mail-pa0-f43.google.com with SMTP id hz10so3467082pad.30 for ; Thu, 08 Aug 2013 06:52:01 -0700 (PDT) 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 Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Viresh Kumar 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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)