[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250220080318.2660840-1-raag.jadav@intel.com>
Date: Thu, 20 Feb 2025 13:33:18 +0530
From: Raag Jadav <raag.jadav@...el.com>
To: rafael@...nel.org,
paul@...pouillou.net,
andriy.shevchenko@...ux.intel.com
Cc: linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Raag Jadav <raag.jadav@...el.com>
Subject: [PATCH v1] PM: Discard runtime_xx() handles using pm_ptr()
Discard runtime_xx() handles in RUNTIME_PM_OPS() using pm_ptr() macro
and drop unnecessary CONFIG_PM ifdeffery.
Signed-off-by: Raag Jadav <raag.jadav@...el.com>
---
PS: I'm not very confident about this but thought I'd give it a try.
include/linux/pm.h | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 78855d794342..416561c60e81 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -334,9 +334,9 @@ struct dev_pm_ops {
.restore_noirq = pm_sleep_ptr(resume_fn),
#define RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
- .runtime_suspend = suspend_fn, \
- .runtime_resume = resume_fn, \
- .runtime_idle = idle_fn,
+ .runtime_suspend = pm_ptr(suspend_fn), \
+ .runtime_resume = pm_ptr(resume_fn), \
+ .runtime_idle = pm_ptr(idle_fn),
#ifdef CONFIG_PM_SLEEP
#define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
@@ -359,12 +359,8 @@ struct dev_pm_ops {
#define SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
#endif
-#ifdef CONFIG_PM
#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
-#else
-#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
-#endif
#define _DEFINE_DEV_PM_OPS(name, \
suspend_fn, resume_fn, \
--
2.34.1
Powered by blists - more mailing lists