diff mbox

[V4,3/3] cpufreq: Make cpufreq_notify_transition & cpufreq_notify_post_transition static

Message ID 827ab1ca9caaa50ed672c5e01806314c06ad8db8.1395379422.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar March 21, 2014, 5:34 a.m. UTC
cpufreq_notify_transition() and cpufreq_notify_post_transition() shouldn't be
called directly by cpufreq drivers anymore and so these should be marked static.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/cpufreq.c | 6 ++----
 include/linux/cpufreq.h   | 4 ----
 2 files changed, 2 insertions(+), 8 deletions(-)

Comments

Srivatsa S. Bhat March 21, 2014, 7:51 a.m. UTC | #1
On 03/21/2014 11:04 AM, Viresh Kumar wrote:
> cpufreq_notify_transition() and cpufreq_notify_post_transition() shouldn't be
> called directly by cpufreq drivers anymore and so these should be marked static.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>

Regards,
Srivatsa S. Bhat

> ---
>  drivers/cpufreq/cpufreq.c | 6 ++----
>  include/linux/cpufreq.h   | 4 ----
>  2 files changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index b63e7e4..7b1feff 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -331,16 +331,15 @@ static void __cpufreq_notify_transition(struct cpufreq_policy *policy,
>   * function. It is called twice on all CPU frequency changes that have
>   * external effects.
>   */
> -void cpufreq_notify_transition(struct cpufreq_policy *policy,
> +static void cpufreq_notify_transition(struct cpufreq_policy *policy,
>  		struct cpufreq_freqs *freqs, unsigned int state)
>  {
>  	for_each_cpu(freqs->cpu, policy->cpus)
>  		__cpufreq_notify_transition(policy, freqs, state);
>  }
> -EXPORT_SYMBOL_GPL(cpufreq_notify_transition);
> 
>  /* Do post notifications when there are chances that transition has failed */
> -void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
> +static void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
>  		struct cpufreq_freqs *freqs, int transition_failed)
>  {
>  	cpufreq_notify_transition(policy, freqs, CPUFREQ_POSTCHANGE);
> @@ -351,7 +350,6 @@ void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
>  	cpufreq_notify_transition(policy, freqs, CPUFREQ_PRECHANGE);
>  	cpufreq_notify_transition(policy, freqs, CPUFREQ_POSTCHANGE);
>  }
> -EXPORT_SYMBOL_GPL(cpufreq_notify_post_transition);
> 
>  void cpufreq_freq_transition_begin(struct cpufreq_policy *policy,
>  		struct cpufreq_freqs *freqs)
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index 263173d..826830b 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -338,10 +338,6 @@ static inline void cpufreq_resume(void) {}
>  int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
>  int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
> 
> -void cpufreq_notify_transition(struct cpufreq_policy *policy,
> -		struct cpufreq_freqs *freqs, unsigned int state);
> -void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
> -		struct cpufreq_freqs *freqs, int transition_failed);
>  void cpufreq_freq_transition_begin(struct cpufreq_policy *policy,
>  		struct cpufreq_freqs *freqs);
>  void cpufreq_freq_transition_end(struct cpufreq_policy *policy,
> 


--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index b63e7e4..7b1feff 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -331,16 +331,15 @@  static void __cpufreq_notify_transition(struct cpufreq_policy *policy,
  * function. It is called twice on all CPU frequency changes that have
  * external effects.
  */
-void cpufreq_notify_transition(struct cpufreq_policy *policy,
+static void cpufreq_notify_transition(struct cpufreq_policy *policy,
 		struct cpufreq_freqs *freqs, unsigned int state)
 {
 	for_each_cpu(freqs->cpu, policy->cpus)
 		__cpufreq_notify_transition(policy, freqs, state);
 }
-EXPORT_SYMBOL_GPL(cpufreq_notify_transition);
 
 /* Do post notifications when there are chances that transition has failed */
-void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
+static void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
 		struct cpufreq_freqs *freqs, int transition_failed)
 {
 	cpufreq_notify_transition(policy, freqs, CPUFREQ_POSTCHANGE);
@@ -351,7 +350,6 @@  void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
 	cpufreq_notify_transition(policy, freqs, CPUFREQ_PRECHANGE);
 	cpufreq_notify_transition(policy, freqs, CPUFREQ_POSTCHANGE);
 }
-EXPORT_SYMBOL_GPL(cpufreq_notify_post_transition);
 
 void cpufreq_freq_transition_begin(struct cpufreq_policy *policy,
 		struct cpufreq_freqs *freqs)
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 263173d..826830b 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -338,10 +338,6 @@  static inline void cpufreq_resume(void) {}
 int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
 int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
 
-void cpufreq_notify_transition(struct cpufreq_policy *policy,
-		struct cpufreq_freqs *freqs, unsigned int state);
-void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
-		struct cpufreq_freqs *freqs, int transition_failed);
 void cpufreq_freq_transition_begin(struct cpufreq_policy *policy,
 		struct cpufreq_freqs *freqs);
 void cpufreq_freq_transition_end(struct cpufreq_policy *policy,