Revert "ARM64: sched: cpufreq_sched: fix bug: init data before use it in thread"
authorHuang, Tao <huangtao@rock-chips.com>
Fri, 4 Nov 2016 06:08:48 +0000 (14:08 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 4 Nov 2016 06:12:10 +0000 (14:12 +0800)
This reverts commit 0ac5bfd6d9652d477387764a11e3b48f1afe6891.

Fixed by commit ac6f9bad52a79154bebd1626344dfc206d1cbefe
("FIXUP: sched: scheduler-driven cpu frequency selection")

Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
kernel/sched/cpufreq_sched.c

index 48053393dc722a3932a4c6435e4bf2a4e9ca1e68..c608a9265d6ae35629691c180c74f01cbf4c8c5a 100644 (file)
@@ -265,8 +265,6 @@ static int cpufreq_sched_policy_init(struct cpufreq_policy *policy)
        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,
@@ -283,6 +281,7 @@ static int cpufreq_sched_policy_init(struct cpufreq_policy *policy)
                init_irq_work(&gd->irq_work, cpufreq_sched_irq_work);
        }
 
+       policy->governor_data = gd;
        set_sched_freq();
 
        return 0;