* 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
Unified · Split
| @@ -1027,6 +1027,8 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool a · 1026 unmodified lines | |||
| 1027 | TRACE_DEVICE(dev); | 1027 | TRACE_DEVICE(dev); |
| 1028 | TRACE_SUSPEND(0); | 1028 | TRACE_SUSPEND(0); |
| 1029 | 1029 | ||
| 1030 | dpm_wait_for_children(dev, async); | ||
| 1031 | |||
| 1030 | if (async_error) | 1032 | if (async_error) |
| 1031 | goto Complete; | 1033 | goto Complete; |
| 1032 | 1034 | ||
| @@ -1038,8 +1040,6 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool a · 5 unmodified lines | |||
| 1038 | if (dev->power.syscore || dev->power.direct_complete) | 1040 | if (dev->power.syscore || dev->power.direct_complete) |
| 1039 | goto Complete; | 1041 | goto Complete; |
| 1040 | 1042 | ||
| 1041 | dpm_wait_for_children(dev, async); | ||
| 1042 | |||
| 1043 | if (dev->pm_domain) { | 1043 | if (dev->pm_domain) { |
| 1044 | info = "noirq power domain "; | 1044 | info = "noirq power domain "; |
| 1045 | callback = pm_noirq_op(&dev->pm_domain->ops, state); | 1045 | 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 · 128 unmodified lines | |||
| 1174 | 1174 | ||
| 1175 | __pm_runtime_disable(dev, false); | 1175 | __pm_runtime_disable(dev, false); |
| 1176 | 1176 | ||
| 1177 | dpm_wait_for_children(dev, async); | ||
| 1178 | |||
| 1177 | if (async_error) | 1179 | if (async_error) |
| 1178 | goto Complete; | 1180 | goto Complete; |
| 1179 | 1181 | ||
| @@ -1185,8 +1187,6 @@ static int __device_suspend_late(struct device *dev, pm_message_t state, bool as · 5 unmodified lines | |||
| 1185 | if (dev->power.syscore || dev->power.direct_complete) | 1187 | if (dev->power.syscore || dev->power.direct_complete) |
| 1186 | goto Complete; | 1188 | goto Complete; |
| 1187 | 1189 | ||
| 1188 | dpm_wait_for_children(dev, async); | ||
| 1189 | |||
| 1190 | if (dev->pm_domain) { | 1190 | if (dev->pm_domain) { |
| 1191 | info = "late power domain "; | 1191 | info = "late power domain "; |
| 1192 | callback = pm_late_early_op(&dev->pm_domain->ops, state); | 1192 | callback = pm_late_early_op(&dev->pm_domain->ops, state); |
| @@ -203,8 +203,10 @@ static int __init test_suspend(void) · 202 unmodified lines | |||
| 203 | 203 | ||
| 204 | /* RTCs have initialized by now too ... can we use one? */ | 204 | /* RTCs have initialized by now too ... can we use one? */ |
| 205 | dev = class_find_device(rtc_class, NULL, NULL, has_wakealarm); | 205 | dev = class_find_device(rtc_class, NULL, NULL, has_wakealarm); |
| 206 | if (dev) | 206 | if (dev) { |
| 207 | rtc = rtc_class_open(dev_name(dev)); | 207 | rtc = rtc_class_open(dev_name(dev)); |
| 208 | put_device(dev); | ||
| 209 | } | ||
| 208 | if (!rtc) { | 210 | if (!rtc) { |
| 209 | printk(warn_no_rtc); | 211 | printk(warn_no_rtc); |
| 210 | return 0; | 212 | return 0; |
| @@ -296,7 +296,7 @@ int cmd_freq_set(int argc, char **argv) · 295 unmodified lines | |||
| 296 | struct cpufreq_affected_cpus *cpus; | 296 | struct cpufreq_affected_cpus *cpus; |
| 297 | 297 | ||
| 298 | if (!bitmask_isbitset(cpus_chosen, cpu) || | 298 | if (!bitmask_isbitset(cpus_chosen, cpu) || |
| 299 | cpupower_is_cpu_online(cpu)) | 299 | cpupower_is_cpu_online(cpu) != 1) |
| 300 | continue; | 300 | continue; |
| 301 | 301 | ||
| 302 | cpus = cpufreq_get_related_cpus(cpu); | 302 | cpus = cpufreq_get_related_cpus(cpu); |
| @@ -316,10 +316,7 @@ int cmd_freq_set(int argc, char **argv) · 13 unmodified lines | |||
| 316 | cpu <= bitmask_last(cpus_chosen); cpu++) { | 316 | cpu <= bitmask_last(cpus_chosen); cpu++) { |
| 317 | 317 | ||
| 318 | if (!bitmask_isbitset(cpus_chosen, cpu) || | 318 | if (!bitmask_isbitset(cpus_chosen, cpu) || |
| 319 | cpupower_is_cpu_online(cpu)) | 319 | cpupower_is_cpu_online(cpu) != 1) |
| 320 | continue; | ||
| 321 | |||
| 322 | if (cpupower_is_cpu_online(cpu) != 1) | ||
| 323 | continue; | 320 | continue; |
| 324 | 321 | ||
| 325 | printf(_("Setting cpu: %d\n"), cpu); | 322 | printf(_("Setting cpu: %d\n"), cpu); |