Skip to content

Commit 384b52c

Browse files
committed
PM: runtime: Introduce one more usage counter guard
Follow previous commit 9a0abc3 ("PM: runtime: Add auto-cleanup macros for "resume and get" operations") and define a runtime PM usage counter guard in which pm_runtime_get_noresume() and pm_runtime_put_noidle() will be used for incrementing and decrementing it, respectively. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameorn@huawei.com>
1 parent d5e58ce commit 384b52c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

include/linux/pm_runtime.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,9 @@ static inline int pm_runtime_put_autosuspend(struct device *dev)
614614
return __pm_runtime_put_autosuspend(dev);
615615
}
616616

617+
DEFINE_GUARD(pm_runtime_noresume, struct device *,
618+
pm_runtime_get_noresume(_T), pm_runtime_put_noidle(_T));
619+
617620
DEFINE_GUARD(pm_runtime_active, struct device *,
618621
pm_runtime_get_sync(_T), pm_runtime_put(_T));
619622
DEFINE_GUARD(pm_runtime_active_auto, struct device *,

0 commit comments

Comments
 (0)