From: Jesper Nilsson <jesper.nilsson@axis.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "rjw@sisk.pl" <rjw@sisk.pl>,
"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Jesper Nilsson <jespern@axis.com>,
Mikael Starvik <starvik@axis.com>,
linux-cris-kernel <linux-cris-kernel@axis.com>
Subject: Re: [PATCH V2 Resend 07/92] cpufreq: cris: Use generic cpufreq routines
Date: Thu, 3 Oct 2013 17:25:42 +0200 [thread overview]
Message-ID: <20131003152542.GR11028@axis.com> (raw)
In-Reply-To: <2906aa4a654021836ca97e717e1cee68ebec93d8.1380783079.git.viresh.kumar@linaro.org>
On Thu, Oct 03, 2013 at 04:58:01PM +0200, Viresh Kumar wrote:
> Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
> and .attr. So its better if we have generic routines for them which can be used
> by cpufreq drivers then.
>
> This patch uses these generic routines for this driver.
You should already have gotten my Acked-by: for this series, but here it is again:
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
> Cc: Mikael Starvik <starvik@axis.com>
> Cc: linux-cris-kernel@axis.com
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/cris-artpec3-cpufreq.c | 23 +++--------------------
> drivers/cpufreq/cris-etraxfs-cpufreq.c | 22 +++-------------------
> 2 files changed, 6 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c
> index 444fd96..d26f4e4 100644
> --- a/drivers/cpufreq/cris-artpec3-cpufreq.c
> +++ b/drivers/cpufreq/cris-artpec3-cpufreq.c
> @@ -54,11 +54,6 @@ static void cris_freq_set_cpu_state(struct cpufreq_policy *policy,
> cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
> };
>
> -static int cris_freq_verify(struct cpufreq_policy *policy)
> -{
> - return cpufreq_frequency_table_verify(policy, &cris_freq_table[0]);
> -}
> -
> static int cris_freq_target(struct cpufreq_policy *policy,
> unsigned int target_freq,
> unsigned int relation)
> @@ -84,26 +79,14 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
> }
>
>
> -static int cris_freq_cpu_exit(struct cpufreq_policy *policy)
> -{
> - cpufreq_frequency_table_put_attr(policy->cpu);
> - return 0;
> -}
> -
> -
> -static struct freq_attr *cris_freq_attr[] = {
> - &cpufreq_freq_attr_scaling_available_freqs,
> - NULL,
> -};
> -
> static struct cpufreq_driver cris_freq_driver = {
> .get = cris_freq_get_cpu_frequency,
> - .verify = cris_freq_verify,
> + .verify = cpufreq_generic_frequency_table_verify,
> .target = cris_freq_target,
> .init = cris_freq_cpu_init,
> - .exit = cris_freq_cpu_exit,
> + .exit = cpufreq_generic_exit,
> .name = "cris_freq",
> - .attr = cris_freq_attr,
> + .attr = cpufreq_generic_attr,
> };
>
> static int __init cris_freq_init(void)
> diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c
> index 428395e..d384e63 100644
> --- a/drivers/cpufreq/cris-etraxfs-cpufreq.c
> +++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c
> @@ -54,11 +54,6 @@ static void cris_freq_set_cpu_state(struct cpufreq_policy *policy,
> cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
> };
>
> -static int cris_freq_verify(struct cpufreq_policy *policy)
> -{
> - return cpufreq_frequency_table_verify(policy, &cris_freq_table[0]);
> -}
> -
> static int cris_freq_target(struct cpufreq_policy *policy,
> unsigned int target_freq, unsigned int relation)
> {
> @@ -82,25 +77,14 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
> return cpufreq_table_validate_and_show(policy, cris_freq_table);
> }
>
> -static int cris_freq_cpu_exit(struct cpufreq_policy *policy)
> -{
> - cpufreq_frequency_table_put_attr(policy->cpu);
> - return 0;
> -}
> -
> -static struct freq_attr *cris_freq_attr[] = {
> - &cpufreq_freq_attr_scaling_available_freqs,
> - NULL,
> -};
> -
> static struct cpufreq_driver cris_freq_driver = {
> .get = cris_freq_get_cpu_frequency,
> - .verify = cris_freq_verify,
> + .verify = cpufreq_generic_frequency_table_verify,
> .target = cris_freq_target,
> .init = cris_freq_cpu_init,
> - .exit = cris_freq_cpu_exit,
> + .exit = cpufreq_generic_exit,
> .name = "cris_freq",
> - .attr = cris_freq_attr,
> + .attr = cpufreq_generic_attr,
> };
>
> static int __init cris_freq_init(void)
> --
> 1.7.12.rc2.18.g61b472e
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
next prev parent reply other threads:[~2013-10-03 15:25 UTC|newest]
Thread overview: 112+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 01/92] cpufreq: define generic .attr, .exit() and .verify() routines Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 02/92] cpufreq: acpi: Use generic cpufreq routines Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 03/92] cpufreq: arm_big_little: " Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 04/92] cpufreq: at32ap: " Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 05/92] cpufreq: blackfin: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 06/92] cpufreq: cpu0: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 07/92] cpufreq: cris: " Viresh Kumar
2013-10-03 15:25 ` Jesper Nilsson [this message]
2013-10-03 15:46 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 08/92] cpufreq: davinci: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 09/92] cpufreq: dbx500: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 10/92] cpufreq: e_powersaver: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 11/92] cpufreq: elanfreq: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 12/92] cpufreq: exynos: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 13/92] cpufreq: ia64-acpi: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 14/92] cpufreq: imx6q: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 15/92] cpufreq: kirkwood: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 16/92] cpufreq: longhaul: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 17/92] cpufreq: loongson2: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 18/92] cpufreq: maple: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 19/92] cpufreq: omap: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 20/92] cpufreq: p4-clockmod: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 21/92] cpufreq: pasemi: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 22/92] cpufreq: pmac: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 23/92] cpufreq: powernow: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 24/92] cpufreq: ppc-corenet: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 25/92] cpufreq: ppc_cbe: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 26/92] cpufreq: pxa: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 27/92] cpufreq: s3cx4xx: " Viresh Kumar
2013-10-05 2:27 ` Kukjin Kim
2013-10-07 2:59 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 28/92] cpufreq: s5pv210: " Viresh Kumar
2013-10-05 2:28 ` Kukjin Kim
2013-10-03 14:58 ` [PATCH V2 Resend 29/92] cpufreq: sa11x0: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 30/92] cpufreq: sc520: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 31/92] cpufreq: sh: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 32/92] cpufreq: sparc: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 33/92] cpufreq: spear: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 34/92] cpufreq: speedstep: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 35/92] cpufreq: tegra: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 36/92] cpufreq: call cpufreq_driver->get() after calling ->init() Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 37/92] cpufreq: acpi: don't initialize part of policy that is set by core too Viresh Kumar
2013-10-11 12:51 ` Rafael J. Wysocki
2013-10-11 14:37 ` Viresh Kumar
2013-10-11 21:16 ` Rafael J. Wysocki
2013-10-03 14:58 ` [PATCH V2 Resend 38/92] cpufreq: arm_big_little: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 39/92] cpufreq: at32ap: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 40/92] cpufreq: blackfin: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 41/92] cpufreq: cpu0: " Viresh Kumar
2013-10-05 8:00 ` Shawn Guo
2013-10-03 14:58 ` [PATCH V2 Resend 42/92] cpufreq: nforce2: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 43/92] cpufreq: cris: " Viresh Kumar
2013-10-03 15:27 ` Jesper Nilsson
2013-10-03 14:58 ` [PATCH V2 Resend 44/92] cpufreq: davinci: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 45/92] cpufreq: dbx500: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 46/92] cpufreq: e_powersaver: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 47/92] cpufreq: elanfreq: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 48/92] cpufreq: exynos: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 49/92] cpufreq: gx: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 50/92] cpufreq: ia64-acpi: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 51/92] cpufreq: imx6q: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 52/92] cpufreq: integrator: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 53/92] cpufreq: kirkwood: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 54/92] cpufreq: longhaul: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 55/92] cpufreq: loongson2: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 56/92] cpufreq: maple: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 57/92] cpufreq: omap: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 58/92] cpufreq: p4: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 59/92] cpufreq: pcc: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 60/92] cpufreq: pmac: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 61/92] cpufreq: powernow: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 62/92] cpufreq: ppc: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 63/92] cpufreq: pxa: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 64/92] cpufreq: s3c: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 65/92] cpufreq: s5pv210: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 66/92] cpufreq: sa11x0: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 67/92] cpufreq: sc520_freq: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 68/92] cpufreq: sh: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 69/92] cpufreq: spear: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 70/92] cpufreq: speedstep: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 71/92] cpufreq: tegra: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 72/92] cpufreq: unicore2: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 73/92] cpufreq: create cpufreq_generic_init() routine Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 74/92] cpufreq: remove CONFIG_CPU_FREQ_TABLE Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 75/92] cpufreq: cpu0: use cpufreq_generic_init() routine Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 76/92] cpufreq: cris: " Viresh Kumar
2013-10-03 15:27 ` Jesper Nilsson
2013-10-03 14:59 ` [PATCH V2 Resend 77/92] cpufreq: davinci: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 78/92] cpufreq: dbx500: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 79/92] cpufreq: exynos: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 80/92] cpufreq: imx6q: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 81/92] cpufreq: kirkwood: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 82/92] cpufreq: loongson2: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 83/92] cpufreq: maple: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 84/92] cpufreq: omap: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 85/92] cpufreq: pasemi: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 86/92] cpufreq: pmac32: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 87/92] cpufreq: pmac64: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 88/92] cpufreq: s3c: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 89/92] cpufreq: s5pv210: " Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 90/92] cpufreq: sa11x0: " Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 91/92] cpufreq: spear: " Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 92/92] cpufreq: tegra: " Viresh Kumar
2013-10-11 13:27 ` [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Rafael J. Wysocki
2013-10-11 13:57 ` Viresh Kumar
2013-10-11 22:17 ` Rafael J. Wysocki
2013-10-12 1:25 ` Viresh Kumar
2013-10-12 13:46 ` Rafael J. Wysocki
2013-10-12 15:22 ` Viresh Kumar
2013-10-12 20:30 ` Rafael J. Wysocki
2013-10-13 0:41 ` 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=20131003152542.GR11028@axis.com \
--to=jesper.nilsson@axis.com \
--cc=cpufreq@vger.kernel.org \
--cc=jespern@axis.com \
--cc=linux-cris-kernel@axis.com \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=starvik@axis.com \
--cc=viresh.kumar@linaro.org \
/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).