EXPORT_SYMBOL(cpufreq_sysfs_remove_file);
/* symlink affected CPUs */
-static int cpufreq_add_dev_symlink(unsigned int cpu,
- struct cpufreq_policy *policy)
+static int cpufreq_add_dev_symlink(struct cpufreq_policy *policy)
{
unsigned int j;
int ret = 0;
for_each_cpu(j, policy->cpus) {
struct device *cpu_dev;
- if (j == cpu)
+ if (j == policy->cpu)
continue;
pr_debug("Adding link for CPU: %u\n", j);
- cpufreq_cpu_get(cpu);
+ cpufreq_cpu_get(policy->cpu);
cpu_dev = get_cpu_device(j);
ret = sysfs_create_link(&cpu_dev->kobj, &policy->kobj,
"cpufreq");
return ret;
}
-static int cpufreq_add_dev_interface(unsigned int cpu,
- struct cpufreq_policy *policy,
+static int cpufreq_add_dev_interface(struct cpufreq_policy *policy,
struct device *dev)
{
struct freq_attr **drv_attr;
goto err_out_kobj_put;
}
- ret = cpufreq_add_dev_symlink(cpu, policy);
+ ret = cpufreq_add_dev_symlink(policy);
if (ret)
goto err_out_kobj_put;
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
if (!frozen) {
- ret = cpufreq_add_dev_interface(cpu, policy, dev);
+ ret = cpufreq_add_dev_interface(policy, dev);
if (ret)
goto err_out_unregister;
}