Since pm_runtime_get_active() returns 0 on success, all of the DEFINE_GUARD_COND() macros in pm_runtime.h need the "_RET == 0" condition at the end of the argument list or they would not work correctly.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -629,13 +629,13 @@ DEFINE_GUARD(pm_runtime_active_auto, struct device *, · 628 unmodified lines | ||
| 629 | 629 | * device. |
| 630 | 630 | */ |
| 631 | 631 | DEFINE_GUARD_COND(pm_runtime_active, _try, |
| 632 | − pm_runtime_get_active(_T, RPM_TRANSPARENT)) | |
| 632 | + pm_runtime_get_active(_T, RPM_TRANSPARENT), _RET == 0) | |
| 633 | 633 | DEFINE_GUARD_COND(pm_runtime_active, _try_enabled, |
| 634 | − pm_runtime_resume_and_get(_T)) | |
| 634 | + pm_runtime_resume_and_get(_T), _RET == 0) | |
| 635 | 635 | DEFINE_GUARD_COND(pm_runtime_active_auto, _try, |
| 636 | − pm_runtime_get_active(_T, RPM_TRANSPARENT)) | |
| 636 | + pm_runtime_get_active(_T, RPM_TRANSPARENT), _RET == 0) | |
| 637 | 637 | DEFINE_GUARD_COND(pm_runtime_active_auto, _try_enabled, |
| 638 | − pm_runtime_resume_and_get(_T)) | |
| 638 | + pm_runtime_resume_and_get(_T), _RET == 0) | |
| 639 | 639 | |
| 640 | 640 | /** |
| 641 | 641 | * pm_runtime_put_sync - Drop device usage counter and run "idle check" if 0. |