aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index cac4a92259da..6153b66139d5 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2404,6 +2404,20 @@ EXPORT_SYMBOL_GPL(cpufreq_boost_enabled);
2404 *********************************************************************/ 2404 *********************************************************************/
2405static enum cpuhp_state hp_online; 2405static enum cpuhp_state hp_online;
2406 2406
2407static int cpuhp_cpufreq_online(unsigned int cpu)
2408{
2409 cpufreq_online(cpu);
2410
2411 return 0;
2412}
2413
2414static int cpuhp_cpufreq_offline(unsigned int cpu)
2415{
2416 cpufreq_offline(cpu);
2417
2418 return 0;
2419}
2420
2407/** 2421/**
2408 * cpufreq_register_driver - register a CPU Frequency driver 2422 * cpufreq_register_driver - register a CPU Frequency driver
2409 * @driver_data: A struct cpufreq_driver containing the values# 2423 * @driver_data: A struct cpufreq_driver containing the values#
@@ -2466,8 +2480,8 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
2466 } 2480 }
2467 2481
2468 ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "cpufreq:online", 2482 ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "cpufreq:online",
2469 cpufreq_online, 2483 cpuhp_cpufreq_online,
2470 cpufreq_offline); 2484 cpuhp_cpufreq_offline);
2471 if (ret < 0) 2485 if (ret < 0)
2472 goto err_if_unreg; 2486 goto err_if_unreg;
2473 hp_online = ret; 2487 hp_online = ret;