[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKohpo=F5R7oG_xEopChLMqGo6umH0zqnknv_NJKA_TKDaSgjw@mail.gmail.com>
Date: Mon, 28 Jan 2013 15:22:13 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Borislav Petkov <bp@...en8.de>,
Viresh Kumar <viresh.kumar@...aro.org>,
"Rafael J. Wysocki" <rjw@...k.pl>,
André Przywara <andre@...rep.de>,
Leonid Isaev <lisaev@...il.iu.edu>,
Tom Gundersen <teg@...m.no>, cpufreq@...r.kernel.org,
linux-acpi@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...e.de>
Subject: Re: [PATCH 4/6] cpufreq: Add a get_current_driver helper
On 28 January 2013 15:19, Borislav Petkov <bp@...en8.de> wrote:
> Which one would you suggest: CPUFREQ DRIVER INTERFACE?
Yes.
> Btw, this function type splitting looks kinda silly to me. In that same
> section there are two which clearly don't belong there:
>
> struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
> void cpufreq_cpu_put(struct cpufreq_policy *data);
>
> since they don't have anything to do with freq_table. And since they
> return cpufreq_policy, they should be maybe called:
>
> cpufreq_get_cpu_policy
> cpufreq_put_cpu_policy
>
> or something more expressive, pertaining to what they actually do. But
> they actually get/put the module (inc/dec the module's refcount) *and*
> return the cpufreq_policy... whatever, I don't care that much so see
> below.
Agree.
> --
> From 830eb9ebc715d329229772d11332c50dfd1d9330 Mon Sep 17 00:00:00 2001
> From: Borislav Petkov <bp@...e.de>
> Date: Mon, 28 Jan 2013 10:38:33 +0100
> Subject: [PATCH] cpufreq: Sort function prototypes properly
>
> Move function prototypes to a place where they logically fit better.
>
> Signed-off-by: Borislav Petkov <bp@...e.de>
> ---
> include/linux/cpufreq.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index a018da2d2a7c..f33ace57adb6 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -308,6 +308,9 @@ __ATTR(_name, 0444, show_##_name, NULL)
> static struct global_attr _name = \
> __ATTR(_name, 0644, show_##_name, store_##_name)
>
> +struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
> +void cpufreq_cpu_put(struct cpufreq_policy *data);
> +const char *cpufreq_get_current_driver(void);
>
> /*********************************************************************
> * CPUFREQ 2.6. INTERFACE *
> @@ -397,8 +400,6 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
>
> /* the following 3 funtions are for cpufreq core use only */
> struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu);
> -struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
> -void cpufreq_cpu_put(struct cpufreq_policy *data);
>
> /* the following are really really optional */
> extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
> @@ -407,5 +408,4 @@ void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,
> unsigned int cpu);
>
> void cpufreq_frequency_table_put_attr(unsigned int cpu);
> -extern const char *cpufreq_get_current_driver(void);
> #endif /* _LINUX_CPUFREQ_H */
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists