Commit 388612ba authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

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.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 9a15fb2c
...@@ -1258,9 +1258,6 @@ static int cpufreq_online(unsigned int cpu) ...@@ -1258,9 +1258,6 @@ static int cpufreq_online(unsigned int cpu)
} }
} }
blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
CPUFREQ_START, policy);
if (new_policy) { if (new_policy) {
ret = cpufreq_add_dev_interface(policy); ret = cpufreq_add_dev_interface(policy);
if (ret) if (ret)
...@@ -1273,6 +1270,9 @@ static int cpufreq_online(unsigned int cpu) ...@@ -1273,6 +1270,9 @@ static int cpufreq_online(unsigned int cpu)
write_unlock_irqrestore(&cpufreq_driver_lock, flags); write_unlock_irqrestore(&cpufreq_driver_lock, flags);
} }
blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
CPUFREQ_START, policy);
ret = cpufreq_init_policy(policy); ret = cpufreq_init_policy(policy);
if (ret) { if (ret) {
pr_err("%s: Failed to initialize policy for cpu: %d (%d)\n", pr_err("%s: Failed to initialize policy for cpu: %d (%d)\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment