Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163093
b: refs/heads/master
c: 4bfa042
h: refs/heads/master
i:
  163091: b99dcc2
v: v3
  • Loading branch information
Thomas Renninger authored and Dave Jones committed Sep 1, 2009
1 parent 46192b1 commit 2c34f63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ecf7e4611c89aba7c7fde1183f7e9357695fbcc5
refs/heads/master: 4bfa042cd304aa48cf05cd0a13c2d0794a675c0e
20 changes: 17 additions & 3 deletions trunk/drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,12 @@ static struct kobj_type ktype_cpufreq = {
.release = cpufreq_sysfs_release,
};


/*
* Returns:
* Negative: Failure
* 0: Success
* Positive: When we have a managed CPU and the sysfs got symlinked
*/
int cpufreq_add_dev_policy(unsigned int cpu, struct cpufreq_policy *policy,
struct sys_device *sys_dev)
{
Expand Down Expand Up @@ -817,7 +822,11 @@ int cpufreq_add_dev_policy(unsigned int cpu, struct cpufreq_policy *policy,
*/
if (cpufreq_driver->exit)
cpufreq_driver->exit(policy);
return ret;

if (!ret)
return 1;
else
return ret;
}
}
#endif
Expand Down Expand Up @@ -1001,8 +1010,13 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
CPUFREQ_START, policy);

ret = cpufreq_add_dev_policy(cpu, policy, sys_dev);
if (ret)
if (ret) {
if (ret > 0)
/* This is a managed cpu, symlink created,
exit with 0 */
ret = 0;
goto err_unlock_policy;
}

ret = cpufreq_add_dev_interface(cpu, policy, sys_dev);
if (ret)
Expand Down

0 comments on commit 2c34f63

Please sign in to comment.