mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge branches 'pm-cpuidle', 'pm-cpufreq', 'pm-domains' and 'pm-sleep'
* pm-cpuidle: cpuidle: coupled: remove unused define cpuidle_coupled_lock cpuidle: fix fallback mechanism for suspend to idle in absence of enter_freeze * pm-cpufreq: cpufreq: cpufreq-dt: avoid uninitialized variable warnings: cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype cpufreq: Use list_is_last() to check last entry of the policy list cpufreq: Fix NULL reference crash while accessing policy->governor_data * pm-domains: PM / Domains: Fix typo in comment PM / Domains: Fix potential deadlock while adding/removing subdomains PM / domains: fix lockdep issue for all subdomains * pm-sleep: PM: APM_EMULATION does not depend on PM
This commit is contained in:
commit
ad1ac94767
9 changed files with 42 additions and 36 deletions
|
|
@ -142,15 +142,16 @@ static int allocate_resources(int cpu, struct device **cdev,
|
|||
|
||||
try_again:
|
||||
cpu_reg = regulator_get_optional(cpu_dev, reg);
|
||||
if (IS_ERR(cpu_reg)) {
|
||||
ret = PTR_ERR_OR_ZERO(cpu_reg);
|
||||
if (ret) {
|
||||
/*
|
||||
* If cpu's regulator supply node is present, but regulator is
|
||||
* not yet registered, we should try defering probe.
|
||||
*/
|
||||
if (PTR_ERR(cpu_reg) == -EPROBE_DEFER) {
|
||||
if (ret == -EPROBE_DEFER) {
|
||||
dev_dbg(cpu_dev, "cpu%d regulator not ready, retry\n",
|
||||
cpu);
|
||||
return -EPROBE_DEFER;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Try with "cpu-supply" */
|
||||
|
|
@ -159,18 +160,16 @@ try_again:
|
|||
goto try_again;
|
||||
}
|
||||
|
||||
dev_dbg(cpu_dev, "no regulator for cpu%d: %ld\n",
|
||||
cpu, PTR_ERR(cpu_reg));
|
||||
dev_dbg(cpu_dev, "no regulator for cpu%d: %d\n", cpu, ret);
|
||||
}
|
||||
|
||||
cpu_clk = clk_get(cpu_dev, NULL);
|
||||
if (IS_ERR(cpu_clk)) {
|
||||
ret = PTR_ERR_OR_ZERO(cpu_clk);
|
||||
if (ret) {
|
||||
/* put regulator */
|
||||
if (!IS_ERR(cpu_reg))
|
||||
regulator_put(cpu_reg);
|
||||
|
||||
ret = PTR_ERR(cpu_clk);
|
||||
|
||||
/*
|
||||
* If cpu's clk node is present, but clock is not yet
|
||||
* registered, we should try defering probe.
|
||||
|
|
|
|||
|
|
@ -48,11 +48,11 @@ static struct cpufreq_policy *next_policy(struct cpufreq_policy *policy,
|
|||
bool active)
|
||||
{
|
||||
do {
|
||||
policy = list_next_entry(policy, policy_list);
|
||||
|
||||
/* No more policies in the list */
|
||||
if (&policy->policy_list == &cpufreq_policy_list)
|
||||
if (list_is_last(&policy->policy_list, &cpufreq_policy_list))
|
||||
return NULL;
|
||||
|
||||
policy = list_next_entry(policy, policy_list);
|
||||
} while (!suitable_policy(policy, active));
|
||||
|
||||
return policy;
|
||||
|
|
|
|||
|
|
@ -387,16 +387,18 @@ static int cpufreq_governor_init(struct cpufreq_policy *policy,
|
|||
if (!have_governor_per_policy())
|
||||
cdata->gdbs_data = dbs_data;
|
||||
|
||||
policy->governor_data = dbs_data;
|
||||
|
||||
ret = sysfs_create_group(get_governor_parent_kobj(policy),
|
||||
get_sysfs_attr(dbs_data));
|
||||
if (ret)
|
||||
goto reset_gdbs_data;
|
||||
|
||||
policy->governor_data = dbs_data;
|
||||
|
||||
return 0;
|
||||
|
||||
reset_gdbs_data:
|
||||
policy->governor_data = NULL;
|
||||
|
||||
if (!have_governor_per_policy())
|
||||
cdata->gdbs_data = NULL;
|
||||
cdata->exit(dbs_data, !policy->governor->initialized);
|
||||
|
|
@ -417,16 +419,19 @@ static int cpufreq_governor_exit(struct cpufreq_policy *policy,
|
|||
if (!cdbs->shared || cdbs->shared->policy)
|
||||
return -EBUSY;
|
||||
|
||||
policy->governor_data = NULL;
|
||||
if (!--dbs_data->usage_count) {
|
||||
sysfs_remove_group(get_governor_parent_kobj(policy),
|
||||
get_sysfs_attr(dbs_data));
|
||||
|
||||
policy->governor_data = NULL;
|
||||
|
||||
if (!have_governor_per_policy())
|
||||
cdata->gdbs_data = NULL;
|
||||
|
||||
cdata->exit(dbs_data, policy->governor->initialized == 1);
|
||||
kfree(dbs_data);
|
||||
} else {
|
||||
policy->governor_data = NULL;
|
||||
}
|
||||
|
||||
free_common_dbs_info(policy, cdata);
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ static void __init pxa_cpufreq_init_voltages(void)
|
|||
}
|
||||
}
|
||||
#else
|
||||
static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq)
|
||||
static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue