Commit 8a007d6
committed
PM: runtime: Take active children into account in pm_runtime_get_if_in_use()
JIRA: https://issues.redhat.com/browse/RHEL-109251
commit 5188839
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date: Tue, 15 Jul 2025 15:03:25 +0000
For all practical purposes, there is no difference between the situation
in which a given device is not ignoring children and its active child
count is nonzero and the situation in which its runtime PM usage counter
is nonzero. However, pm_runtime_get_if_in_use() will only increment the
device's usage counter and return 1 in the latter case.
For consistency, make it do so in the former case either by adjusting
pm_runtime_get_conditional() and update the related kerneldoc comments
accordingly.
Fixes: c111566 ("PM: runtime: Add pm_runtime_get_if_active()")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: 5.10+ <stable@vger.kernel.org> # 5.10+: c0ef3df: PM: runtime: Simplify pm_runtime_get_if_active() usage
Cc: 5.10+ <stable@vger.kernel.org> # 5.10+
Link: https://patch.msgid.link/12700973.O9o76ZdvQC@rjwysocki.net
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>1 parent dd5176f commit 8a007d6
1 file changed
+18
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1203 | 1203 | | |
1204 | 1204 | | |
1205 | 1205 | | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1210 | 1212 | | |
1211 | 1213 | | |
1212 | 1214 | | |
| |||
1228 | 1230 | | |
1229 | 1231 | | |
1230 | 1232 | | |
1231 | | - | |
| 1233 | + | |
| 1234 | + | |
1232 | 1235 | | |
1233 | 1236 | | |
1234 | 1237 | | |
| |||
1261 | 1264 | | |
1262 | 1265 | | |
1263 | 1266 | | |
1264 | | - | |
1265 | | - | |
1266 | | - | |
1267 | | - | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
1268 | 1277 | | |
1269 | 1278 | | |
1270 | 1279 | | |
| |||
0 commit comments