]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PM: sleep: Introduce CALL_PM_OP() macro to simplify code
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>
Fri, 19 Sep 2025 12:44:37 +0000 (18:14 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 20 Oct 2025 17:54:25 +0000 (19:54 +0200)
commit5a151c2328a78aa0949a393f5c475a64b93a89ca
tree32500130f5e2306ebfdeae7eda281eb68786185c
parentb57100a3d9ced8c2b78e87d313f514a3338d016e
PM: sleep: Introduce CALL_PM_OP() macro to simplify code

Add CALL_PM_OP() macro to eliminate a repetitive code pattern in
power management generic operations.

Replace analogous driver PM callback invocation logic across all
pm_generic_*() functions with a single macro that handles the NULL
pointer checks and function calls.

This reduces code size while maintaining the same functionality and
improving code maintainability.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Link: https://patch.msgid.link/20250919124437.3075016-1-kaushlendra.kumar@intel.com
[ rjw: Subject and changelog edits, adjust white space ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/generic_ops.c