From 2cfe35d495f85ff1e9ecc52e6ef5b7b2968ba5f3 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Tue, 24 May 2016 10:26:50 +0530 Subject: [PATCH] UPSTREAM: cpufreq: Send START policy notification after sending CREATE The sequence got a bit wrong as we are sending CPUFREQ_START notifications even before we have sent CPUFREQ_CREATE_POLICY. Fix it. Change-Id: I7d1fba317314bb5e5601b1354494398def156424 Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Signed-off-by: Finley Xiao (cherry picked from commit 388612baba201bdcedfa66782f524dcc507d9f12) --- drivers/cpufreq/cpufreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 7b728143440d..0e94bec22807 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1296,9 +1296,6 @@ static int cpufreq_online(unsigned int cpu) } } - blocking_notifier_call_chain(&cpufreq_policy_notifier_list, - CPUFREQ_START, policy); - if (new_policy) { ret = cpufreq_add_dev_interface(policy); if (ret) @@ -1311,6 +1308,9 @@ static int cpufreq_online(unsigned int cpu) write_unlock_irqrestore(&cpufreq_driver_lock, flags); } + blocking_notifier_call_chain(&cpufreq_policy_notifier_list, + CPUFREQ_START, policy); + ret = cpufreq_init_policy(policy); if (ret) { pr_err("%s: Failed to initialize policy for cpu: %d (%d)\n", -- 2.34.1