History

PM: runtime: Fix conditional guard definitions

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.

Rafael J. Wysocki committed 1 year ago

Commit db82b8d1 parent 211ddde1 file · +4 −4Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/pm_runtime.h+4−4
@@ -629,13 +629,13 @@ DEFINE_GUARD(pm_runtime_active_auto, struct device *, · 628 unmodified lines
629629 * device.
630630 */
631631 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)
633633 DEFINE_GUARD_COND(pm_runtime_active, _try_enabled,
634− pm_runtime_resume_and_get(_T))
634+ pm_runtime_resume_and_get(_T), _RET == 0)
635635 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)
637637 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)
639639
640640 /**
641641 * pm_runtime_put_sync - Drop device usage counter and run "idle check" if 0.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t