mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
Merge branches 'pm-tools-fixes' and 'pm-sleep-fixes'
* pm-tools-fixes: cpupower: Correct return type of cpu_power_is_cpu_online() in cpufreq-set * pm-sleep-fixes: PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails PM / sleep: fix device reference leak in test_suspend
This commit is contained in:
commit
cd16f3dcdb
3 changed files with 9 additions and 10 deletions
|
@ -1027,6 +1027,8 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool a
|
||||||
TRACE_DEVICE(dev);
|
TRACE_DEVICE(dev);
|
||||||
TRACE_SUSPEND(0);
|
TRACE_SUSPEND(0);
|
||||||
|
|
||||||
|
dpm_wait_for_children(dev, async);
|
||||||
|
|
||||||
if (async_error)
|
if (async_error)
|
||||||
goto Complete;
|
goto Complete;
|
||||||
|
|
||||||
|
@ -1038,8 +1040,6 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool a
|
||||||
if (dev->power.syscore || dev->power.direct_complete)
|
if (dev->power.syscore || dev->power.direct_complete)
|
||||||
goto Complete;
|
goto Complete;
|
||||||
|
|
||||||
dpm_wait_for_children(dev, async);
|
|
||||||
|
|
||||||
if (dev->pm_domain) {
|
if (dev->pm_domain) {
|
||||||
info = "noirq power domain ";
|
info = "noirq power domain ";
|
||||||
callback = pm_noirq_op(&dev->pm_domain->ops, state);
|
callback = pm_noirq_op(&dev->pm_domain->ops, state);
|
||||||
|
@ -1174,6 +1174,8 @@ static int __device_suspend_late(struct device *dev, pm_message_t state, bool as
|
||||||
|
|
||||||
__pm_runtime_disable(dev, false);
|
__pm_runtime_disable(dev, false);
|
||||||
|
|
||||||
|
dpm_wait_for_children(dev, async);
|
||||||
|
|
||||||
if (async_error)
|
if (async_error)
|
||||||
goto Complete;
|
goto Complete;
|
||||||
|
|
||||||
|
@ -1185,8 +1187,6 @@ static int __device_suspend_late(struct device *dev, pm_message_t state, bool as
|
||||||
if (dev->power.syscore || dev->power.direct_complete)
|
if (dev->power.syscore || dev->power.direct_complete)
|
||||||
goto Complete;
|
goto Complete;
|
||||||
|
|
||||||
dpm_wait_for_children(dev, async);
|
|
||||||
|
|
||||||
if (dev->pm_domain) {
|
if (dev->pm_domain) {
|
||||||
info = "late power domain ";
|
info = "late power domain ";
|
||||||
callback = pm_late_early_op(&dev->pm_domain->ops, state);
|
callback = pm_late_early_op(&dev->pm_domain->ops, state);
|
||||||
|
|
|
@ -203,8 +203,10 @@ static int __init test_suspend(void)
|
||||||
|
|
||||||
/* RTCs have initialized by now too ... can we use one? */
|
/* RTCs have initialized by now too ... can we use one? */
|
||||||
dev = class_find_device(rtc_class, NULL, NULL, has_wakealarm);
|
dev = class_find_device(rtc_class, NULL, NULL, has_wakealarm);
|
||||||
if (dev)
|
if (dev) {
|
||||||
rtc = rtc_class_open(dev_name(dev));
|
rtc = rtc_class_open(dev_name(dev));
|
||||||
|
put_device(dev);
|
||||||
|
}
|
||||||
if (!rtc) {
|
if (!rtc) {
|
||||||
printk(warn_no_rtc);
|
printk(warn_no_rtc);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -296,7 +296,7 @@ int cmd_freq_set(int argc, char **argv)
|
||||||
struct cpufreq_affected_cpus *cpus;
|
struct cpufreq_affected_cpus *cpus;
|
||||||
|
|
||||||
if (!bitmask_isbitset(cpus_chosen, cpu) ||
|
if (!bitmask_isbitset(cpus_chosen, cpu) ||
|
||||||
cpupower_is_cpu_online(cpu))
|
cpupower_is_cpu_online(cpu) != 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
cpus = cpufreq_get_related_cpus(cpu);
|
cpus = cpufreq_get_related_cpus(cpu);
|
||||||
|
@ -316,10 +316,7 @@ int cmd_freq_set(int argc, char **argv)
|
||||||
cpu <= bitmask_last(cpus_chosen); cpu++) {
|
cpu <= bitmask_last(cpus_chosen); cpu++) {
|
||||||
|
|
||||||
if (!bitmask_isbitset(cpus_chosen, cpu) ||
|
if (!bitmask_isbitset(cpus_chosen, cpu) ||
|
||||||
cpupower_is_cpu_online(cpu))
|
cpupower_is_cpu_online(cpu) != 1)
|
||||||
continue;
|
|
||||||
|
|
||||||
if (cpupower_is_cpu_online(cpu) != 1)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
printf(_("Setting cpu: %d\n"), cpu);
|
printf(_("Setting cpu: %d\n"), cpu);
|
||||||
|
|
Loading…
Add table
Reference in a new issue