@@ -33,7 +33,6 @@ struct private_data {
struct device *cpu_dev;
struct regulator *cpu_reg;
struct thermal_cooling_device *cdev;
- unsigned int voltage_tolerance; /* in percentage */
const char *reg_name;
};
@@ -140,7 +139,6 @@ static int allocate_resources(int cpu, struct device **cdev,
static int cpufreq_init(struct cpufreq_policy *policy)
{
struct cpufreq_frequency_table *freq_table;
- struct device_node *np;
struct private_data *priv;
struct device *cpu_dev;
struct regulator *cpu_reg;
@@ -157,13 +155,6 @@ static int cpufreq_init(struct cpufreq_policy *policy)
return ret;
}
- np = of_node_get(cpu_dev->of_node);
- if (!np) {
- dev_err(cpu_dev, "failed to find cpu%d node\n", policy->cpu);
- ret = -ENOENT;
- goto out_put_reg_clk;
- }
-
/* Get OPP-sharing information from "operating-points-v2" bindings */
ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, policy->cpus);
if (ret) {
@@ -174,7 +165,7 @@ static int cpufreq_init(struct cpufreq_policy *policy)
if (ret == -ENOENT)
opp_v1 = true;
else
- goto out_node_put;
+ goto out_put_reg_clk;
}
/*
@@ -242,7 +233,6 @@ static int cpufreq_init(struct cpufreq_policy *policy)
}
priv->reg_name = name;
- of_property_read_u32(np, "voltage-tolerance", &priv->voltage_tolerance);
ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table);
if (ret) {
@@ -284,8 +274,6 @@ static int cpufreq_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = transition_latency;
- of_node_put(np);
-
return 0;
out_free_cpufreq_table:
@@ -296,8 +284,6 @@ static int cpufreq_init(struct cpufreq_policy *policy)
dev_pm_opp_of_cpumask_remove_table(policy->cpus);
if (opp_v1)
dev_pm_opp_put_regulator(cpu_dev);
-out_node_put:
- of_node_put(np);
out_put_reg_clk:
clk_put(cpu_clk);
if (!IS_ERR(cpu_reg))
We don't need to get reference to DT node now, lets drop it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/cpufreq-dt.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) -- 2.7.0.rc1.186.g94414c4 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html