Commit c4d14bc0bb5d13e316890651ae4518b764c3344c

Authored by Sven Wegener
Committed by Dave Jones
1 parent 8080091310

[CPUFREQ] Don't export governors for default governor

We don't need to export the governors for use as the default governor,
because the default governor will be built-in anyway and we can access
the symbol directly.

This also fixes the following sparse warnings:

drivers/cpufreq/cpufreq_conservative.c:578:25: warning: symbol 'cpufreq_gov_conservative' was not declared. Should it be static?
drivers/cpufreq/cpufreq_ondemand.c:582:25: warning: symbol 'cpufreq_gov_ondemand' was not declared. Should it be static?
drivers/cpufreq/cpufreq_performance.c:39:25: warning: symbol 'cpufreq_gov_performance' was not declared. Should it be static?
drivers/cpufreq/cpufreq_powersave.c:38:25: warning: symbol 'cpufreq_gov_powersave' was not declared. Should it be static?
drivers/cpufreq/cpufreq_userspace.c:190:25: warning: symbol 'cpufreq_gov_userspace' was not declared. Should it be static?

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Dave Jones <davej@redhat.com>

Showing 5 changed files with 15 additions and 5 deletions Side-by-side Diff

drivers/cpufreq/cpufreq_conservative.c
... ... @@ -576,13 +576,15 @@
576 576 return 0;
577 577 }
578 578  
  579 +#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
  580 +static
  581 +#endif
579 582 struct cpufreq_governor cpufreq_gov_conservative = {
580 583 .name = "conservative",
581 584 .governor = cpufreq_governor_dbs,
582 585 .max_transition_latency = TRANSITION_LATENCY_LIMIT,
583 586 .owner = THIS_MODULE,
584 587 };
585   -EXPORT_SYMBOL(cpufreq_gov_conservative);
586 588  
587 589 static int __init cpufreq_gov_dbs_init(void)
588 590 {
drivers/cpufreq/cpufreq_ondemand.c
... ... @@ -626,13 +626,15 @@
626 626 return 0;
627 627 }
628 628  
  629 +#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND
  630 +static
  631 +#endif
629 632 struct cpufreq_governor cpufreq_gov_ondemand = {
630 633 .name = "ondemand",
631 634 .governor = cpufreq_governor_dbs,
632 635 .max_transition_latency = TRANSITION_LATENCY_LIMIT,
633 636 .owner = THIS_MODULE,
634 637 };
635   -EXPORT_SYMBOL(cpufreq_gov_ondemand);
636 638  
637 639 static int __init cpufreq_gov_dbs_init(void)
638 640 {
drivers/cpufreq/cpufreq_performance.c
... ... @@ -36,12 +36,14 @@
36 36 return 0;
37 37 }
38 38  
  39 +#ifdef CONFIG_CPU_FREQ_GOV_PERFORMANCE_MODULE
  40 +static
  41 +#endif
39 42 struct cpufreq_governor cpufreq_gov_performance = {
40 43 .name = "performance",
41 44 .governor = cpufreq_governor_performance,
42 45 .owner = THIS_MODULE,
43 46 };
44   -EXPORT_SYMBOL(cpufreq_gov_performance);
45 47  
46 48  
47 49 static int __init cpufreq_gov_performance_init(void)
drivers/cpufreq/cpufreq_powersave.c
... ... @@ -35,12 +35,14 @@
35 35 return 0;
36 36 }
37 37  
  38 +#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE
  39 +static
  40 +#endif
38 41 struct cpufreq_governor cpufreq_gov_powersave = {
39 42 .name = "powersave",
40 43 .governor = cpufreq_governor_powersave,
41 44 .owner = THIS_MODULE,
42 45 };
43   -EXPORT_SYMBOL(cpufreq_gov_powersave);
44 46  
45 47 static int __init cpufreq_gov_powersave_init(void)
46 48 {
drivers/cpufreq/cpufreq_userspace.c
... ... @@ -187,6 +187,9 @@
187 187 }
188 188  
189 189  
  190 +#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE
  191 +static
  192 +#endif
190 193 struct cpufreq_governor cpufreq_gov_userspace = {
191 194 .name = "userspace",
192 195 .governor = cpufreq_governor_userspace,
... ... @@ -194,7 +197,6 @@
194 197 .show_setspeed = show_speed,
195 198 .owner = THIS_MODULE,
196 199 };
197   -EXPORT_SYMBOL(cpufreq_gov_userspace);
198 200  
199 201 static int __init cpufreq_gov_userspace_init(void)
200 202 {