From: Viresh Kumar <viresh.kumar@linaro.org>
To: rjw@sisk.pl
Cc: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org
Subject: [PATCH V2 Resend 27/44] cpufreq: pxa: use cpufreq_table_validate_and_show()
Date: Mon, 16 Sep 2013 18:56:29 +0530 [thread overview]
Message-ID: <c7c2276a74c370f5bf0e5112a3c98e17984f3136.1379309339.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1379309339.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1379309339.git.viresh.kumar@linaro.org>
Lets use cpufreq_table_validate_and_show() instead of calling
cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr().
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
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 b004cf1..236531a 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 cebbed1..65fd01e 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)
--
1.7.12.rc2.18.g61b472e
next prev parent reply other threads:[~2013-09-16 13:29 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 13:26 [PATCH V2 Resend 00/44] CPUFreq Cleanup Series: Part I Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 01/44] cpufreq: Add new helper cpufreq_table_validate_and_show() Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 02/44] cpufreq: pxa: call cpufreq_frequency_table_get_attr() Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 03/44] cpufreq: s3cx4xx: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 04/44] cpufreq: sparc: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 05/44] cpufreq: acpi-cpufreq: use cpufreq_table_validate_and_show() Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 06/44] cpufreq: arm_big_little: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 07/44] cpufreq: blackfin: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 08/44] cpufreq: cpufreq-cpu0: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 09/44] cpufreq: cris: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 10/44] cpufreq: davinci: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 11/44] cpufreq: dbx500: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 12/44] cpufreq: e_powersaver: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 13/44] cpufreq: elanfreq: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 14/44] cpufreq: exynos: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 15/44] cpufreq: ia64-acpi: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 16/44] cpufreq: imx6q: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 17/44] cpufreq: kirkwood: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 18/44] cpufreq: longhaul: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 19/44] cpufreq: loongson2: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 20/44] cpufreq: maple: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 21/44] cpufreq: omap: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 22/44] cpufreq: p4-clockmod: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 23/44] cpufreq: pasemi: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 24/44] cpufreq: pmac: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 25/44] cpufreq: powernow: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 26/44] cpufreq: ppc: " Viresh Kumar
2013-09-16 13:26 ` Viresh Kumar [this message]
2013-09-16 13:26 ` [PATCH V2 Resend 28/44] cpufreq: s3cx4xx: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 29/44] cpufreq: s5pv210: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 30/44] cpufreq: sa11x0: Expose frequency table Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 31/44] cpufreq: sa11x0: let cpufreq core initialize struct policy fields Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 32/44] cpufreq: sc520: use cpufreq_table_validate_and_show() Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 33/44] cpufreq: sh: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 34/44] cpufreq: sparc: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 35/44] cpufreq: spear: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 36/44] cpufreq: speedstep: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 37/44] cpufreq: tegra: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 38/44] cpufreq: tegra: fix implementation of ->exit() Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 39/44] cpufreq: at32ap: add frequency table Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 40/44] cpufreq: arm_big_little: call cpufreq_frequency_table_put_attr() Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 41/44] cpufreq: blackfin: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 42/44] cpufreq: exynos: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 43/44] cpufreq: loongson2: " Viresh Kumar
2013-09-16 13:26 ` [PATCH V2 Resend 44/44] cpufreq: omap: " Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c7c2276a74c370f5bf0e5112a3c98e17984f3136.1379309339.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=cpufreq@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).