On 02/02, Viresh Kumar wrote:
static int allocate_resources(int cpu, struct device **cdev, struct regulator **creg, struct clk **cclk) { @@ -200,6 +225,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) unsigned long min_uV = ~0, max_uV = 0; unsigned int transition_latency; bool opp_v1 = false;
- const char *name = NULL;
Is this initialization necessary?
int ret; ret = allocate_resources(policy->cpu, &cpu_dev, &cpu_reg, &cpu_clk); @@ -229,6 +255,25 @@ static int cpufreq_init(struct cpufreq_policy *policy) } /*
* OPP layer will be taking care of regulators now, but it needs to know
* the name of the regulator first.
*/
- name = find_supply_name(cpu_dev, np);
- if (IS_ERR(name)) {
This looks to never happen?
ret = PTR_ERR(name);
goto out_node_put;
- }
- if (name) {
ret = dev_pm_opp_set_regulator(cpu_dev, name);