From patchwork Fri Sep 13 12:59:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20089 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E8FBF202E6 for ; Fri, 13 Sep 2013 13:07:13 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id a41sf1227946yho.10 for ; Fri, 13 Sep 2013 06:07:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=K4O3L3dS+2A8kPVJ4IMA6KupU0gyv+ItjxCMwFUmQiw=; b=C0Kn0GFntxwbQG+JL03DJasF3aBgwBvP/DSS31gjOxdQJt0KWUGGxoi+SHMPdf7h8g mBGrUQH46yO/tQyE5Bri6qbW/ZW63/XfbJtiZzKtO1T+fpEPlbvl4mbXE6VTG8QJyOee Z+Gv8OhXY/b+mxTv7gEq64YtC/qzfZPuxxJkfqrtyg/rIM83Cf880BrU9qPx89Q3YAlQ cl68WeEVWQPhdO3vpB0R5d23jmSIPxYDtbh9AvJzJ7OPUpezI/DdtjBDfcBf8f0J2ul+ HzWSpPPQnRgQcvsm/9l0uoBiTsEPubgD+D+psJ41BWGzxuCD2OF0nk4vtYcsxVCgCcTx KcKQ== X-Gm-Message-State: ALoCoQlVXgOuo6qY+0/SimCO1R19FwlrDnmsExV+ZF7mIsVrfibCpR+JI2dk8XnSq8RxMReqKgm/ X-Received: by 10.236.103.199 with SMTP id f47mr482848yhg.54.1379077633713; Fri, 13 Sep 2013 06:07:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.43 with SMTP id e11ls1142497qej.54.gmail; Fri, 13 Sep 2013 06:07:13 -0700 (PDT) X-Received: by 10.52.114.231 with SMTP id jj7mr10166562vdb.2.1379077633515; Fri, 13 Sep 2013 06:07:13 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id b5si3099917vel.62.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:07:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id jx11so924683veb.21 for ; Fri, 13 Sep 2013 06:07:13 -0700 (PDT) X-Received: by 10.52.110.98 with SMTP id hz2mr9188654vdb.1.1379077633423; Fri, 13 Sep 2013 06:07:13 -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 u4csp79643vcz; Fri, 13 Sep 2013 06:07:12 -0700 (PDT) X-Received: by 10.66.158.131 with SMTP id wu3mr2003106pab.181.1379077632476; Fri, 13 Sep 2013 06:07:12 -0700 (PDT) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx.google.com with ESMTPS id t8si7374696pbe.338.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:07:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.181 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.181; Received: by mail-pd0-f181.google.com with SMTP id g10so1222332pdj.26 for ; Fri, 13 Sep 2013 06:07:12 -0700 (PDT) X-Received: by 10.68.178.163 with SMTP id cz3mr1992422pbc.185.1379077631986; Fri, 13 Sep 2013 06:07:11 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id ct4sm11639794pbb.41.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:07:11 -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 , Eric Miao Subject: [PATCH 035/228] cpufreq: pxa: use cpufreq_table_validate_and_show() Date: Fri, 13 Sep 2013 18:29:41 +0530 Message-Id: <87e39df53232f7feaa018a89d67c4b5b77c0ebcc.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-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.128.176 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(). Cc: Eric Miao Signed-off-by: Viresh Kumar --- drivers/cpufreq/pxa2xx-cpufreq.c | 6 ++---- drivers/cpufreq/pxa3xx-cpufreq.c | 8 ++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index 5b8ce9a..b3bfb57 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -454,12 +454,10 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) pr_info("PXA255 cpufreq using %s frequency table\n", pxa255_turbo_table ? "turbo" : "run"); - cpufreq_frequency_table_cpuinfo(policy, pxa255_freq_table); - cpufreq_frequency_table_get_attr(pxa255_freq_table, policy->cpu); + cpufreq_table_validate_and_show(policy, pxa255_freq_table); } else if (cpu_is_pxa27x()) { - cpufreq_frequency_table_cpuinfo(policy, pxa27x_freq_table); - cpufreq_frequency_table_get_attr(pxa27x_freq_table, policy->cpu); + cpufreq_table_validate_and_show(policy, pxa27x_freq_table); } printk(KERN_INFO "PXA CPU frequency change support initialized\n"); diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index 8f14234..3f4986e 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -91,7 +91,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy, struct pxa3xx_freq_info *freqs, int num) { struct cpufreq_frequency_table *table; - int i, ret; + int i; table = kzalloc((num + 1) * sizeof(*table), GFP_KERNEL); if (table == NULL) @@ -108,11 +108,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy, pxa3xx_freqs_num = num; pxa3xx_freqs_table = table; - ret = cpufreq_frequency_table_cpuinfo(policy, table); - if (!ret) - cpufreq_frequency_table_get_attr(table, policy->cpu); - - return ret; + return cpufreq_table_validate_and_show(policy, table); } static void __update_core_freq(struct pxa3xx_freq_info *info)