/* store_scaling_governor - store policy for the specified CPU  */
static ssize_t store_scaling_governor(struct cpufreq_policy *policy, const char *buf, size_t count)
/* store_scaling_governor - store policy for the specified CPU  */
static ssize_t store_scaling_governor(struct cpufreq_policy *policy, const char *buf, size_t count)
{
	unsigned int ret = -EINVAL;
	char	str_governor[16];
	struct cpufreq_policy new_policy;
	ret = cpufreq_get_policy(&new_policy, policy->cpu);
	if (ret)
		return ret;
	ret = sscanf(buf, "%15s", str_governor);
	if (ret != 1)
		return -EINVAL;
	if (cpufreq_parse_governor(str_governor, &new_policy.policy,
						&new_policy.governor))
		return -EINVAL;
	ret = __cpufreq_set_policy(policy, &new_policy);
	policy->user_policy.policy = policy->policy;
	policy->user_policy.governor = policy->governor;
	if (ret)
		return ret;
	else
		return count;
}