return -EINVAL;
ret = cpufreq_set_policy(policy, &new_policy);
- if (ret)
- return ret;
-
- policy->user_policy.policy = policy->policy;
- return count;
+ return ret ? ret : count;
}
/**
goto out_exit_policy;
}
- if (new_policy)
- policy->user_policy.policy = policy->policy;
-
up_write(&policy->rwsem);
kobject_uevent(&policy->kobj, KOBJ_ADD);
memcpy(&new_policy, policy, sizeof(*policy));
new_policy.min = policy->user_policy.min;
new_policy.max = policy->user_policy.max;
- new_policy.policy = policy->user_policy.policy;
/*
* BIOS might change freq behind our back
struct cpufreq_real_policy {
unsigned int min; /* in kHz */
unsigned int max; /* in kHz */
- unsigned int policy; /* see above */
};
struct cpufreq_policy {