policy->governor_data will be use in cpufreq_sched_thread, but it is init
after wake thread, it will cause NULL point access.
Change-Id: I320a3da34560e49f293211be92cb8310d8e395d7
Signed-off-by: Chen Liang <cl@rock-chips.com>
pr_debug("%s: throttle threshold = %u [ns]\n",
__func__, gd->throttle_nsec);
+ policy->governor_data = gd;
+
if (cpufreq_driver_is_slow()) {
cpufreq_driver_slow = true;
gd->task = kthread_create(cpufreq_sched_thread, policy,
init_irq_work(&gd->irq_work, cpufreq_sched_irq_work);
}
- policy->governor_data = gd;
set_sched_freq();
return 0;