Skip to content

Commit bfb5ef2

Browse files
vireshkrafaeljw
authored andcommitted
cpufreq: sparc: Don't mark cpufreq callbacks with __init
These callbacks can be called again by the cpufreq core after the driver is initialized and must be kept around. We currently get section mismatch build warnings. Don't mark them with __init. Fixes: dcfce7c ("cpufreq: sparc: Don't allocate cpufreq_driver dynamically") Reported-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 06c2afb commit bfb5ef2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/cpufreq/sparc-us2e-cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static int us2e_freq_target(struct cpufreq_policy *policy, unsigned int index)
269269
return smp_call_function_single(cpu, __us2e_freq_target, &index, 1);
270270
}
271271

272-
static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy)
272+
static int us2e_freq_cpu_init(struct cpufreq_policy *policy)
273273
{
274274
unsigned int cpu = policy->cpu;
275275
unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000;

drivers/cpufreq/sparc-us3-cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int us3_freq_target(struct cpufreq_policy *policy, unsigned int index)
117117
return smp_call_function_single(cpu, update_safari_cfg, &new_bits, 1);
118118
}
119119

120-
static int __init us3_freq_cpu_init(struct cpufreq_policy *policy)
120+
static int us3_freq_cpu_init(struct cpufreq_policy *policy)
121121
{
122122
unsigned int cpu = policy->cpu;
123123
unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000;

0 commit comments

Comments
 (0)