Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / drivers / cpufreq / cpufreq-dt.c
index 545946ad07527df11459b2d35011774f94f81cac..de3d104c25d7daa8f10f33b7944e226304b671b8 100644 (file)
@@ -319,33 +319,8 @@ static int cpufreq_exit(struct cpufreq_policy *policy)
 static void cpufreq_ready(struct cpufreq_policy *policy)
 {
        struct private_data *priv = policy->driver_data;
-       struct device_node *np = of_node_get(priv->cpu_dev->of_node);
 
-       if (WARN_ON(!np))
-               return;
-
-       /*
-        * For now, just loading the cooling device;
-        * thermal DT code takes care of matching them.
-        */
-       if (of_find_property(np, "#cooling-cells", NULL)) {
-               u32 power_coefficient = 0;
-
-               of_property_read_u32(np, "dynamic-power-coefficient",
-                                    &power_coefficient);
-
-               priv->cdev = of_cpufreq_power_cooling_register(np,
-                               policy, power_coefficient, NULL);
-               if (IS_ERR(priv->cdev)) {
-                       dev_err(priv->cpu_dev,
-                               "running cpufreq without cooling device: %ld\n",
-                               PTR_ERR(priv->cdev));
-
-                       priv->cdev = NULL;
-               }
-       }
-
-       of_node_put(np);
+       priv->cdev = of_cpufreq_cooling_register(policy);
 }
 
 static struct cpufreq_driver dt_cpufreq_driver = {