[PATCH v2 1/2] soundwire: qcom: use the current PM macros

From: Gopi Chandra Sekhar Reddy Kanala

Date: Mon Nov 30 2026 - 02:14:05 EST


Switch from SET_RUNTIME_PM_OPS() to RUNTIME_PM_OPS() and pm_ptr(). The
runtime PM callbacks are then always referenced, so they no longer need
__maybe_unused, and the compiler still drops them when CONFIG_PM is
disabled.

No functional change.

Signed-off-by: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@xxxxxxxxxxxxxxxx>
---
drivers/soundwire/qcom.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index a4cb62897192..4cd9093c303d 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1790,7 +1790,7 @@ static void qcom_swrm_remove(struct platform_device *pdev)
clk_disable_unprepare(ctrl->hclk);
}

-static int __maybe_unused swrm_runtime_resume(struct device *dev)
+static int swrm_runtime_resume(struct device *dev)
{
struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dev);
int ret;
@@ -1859,7 +1859,7 @@ static int __maybe_unused swrm_runtime_resume(struct device *dev)
return 0;
}

-static int __maybe_unused swrm_runtime_suspend(struct device *dev)
+static int swrm_runtime_suspend(struct device *dev)
{
struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dev);
int ret;
@@ -1902,7 +1902,7 @@ static int __maybe_unused swrm_runtime_suspend(struct device *dev)
}

static const struct dev_pm_ops swrm_dev_pm_ops = {
- SET_RUNTIME_PM_OPS(swrm_runtime_suspend, swrm_runtime_resume, NULL)
+ RUNTIME_PM_OPS(swrm_runtime_suspend, swrm_runtime_resume, NULL)
};

static const struct of_device_id qcom_swrm_of_match[] = {
@@ -1924,7 +1924,7 @@ static struct platform_driver qcom_swrm_driver = {
.driver = {
.name = "qcom-soundwire",
.of_match_table = qcom_swrm_of_match,
- .pm = &swrm_dev_pm_ops,
+ .pm = pm_ptr(&swrm_dev_pm_ops),
}
};
module_platform_driver(qcom_swrm_driver);

--
2.43.0