[PATCH] firmware: arm_scmi: Use modern PM ops

From: Nathan Chancellor
Date: Tue Jul 08 2025 - 19:20:03 EST


When building without CONFIG_PM_SLEEP (e.g., with hexagon or s390),
there is a warning because scmi_system_power_resume() is not used due to
how SET_SYSTEM_SLEEP_PM_OPS is defined:

drivers/firmware/arm_scmi/scmi_power_control.c:363:12: error: 'scmi_system_power_resume' defined but not used [-Werror=unused-function]
363 | static int scmi_system_power_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~

Use the moderm SYSTEM_SLEEP_PM_OPS to resolve the warnings, which is
what SET_SYSTEM_SLEEP_PM_OPS ultimately expands to, so there is no
change in behavior.

Fixes: 9a0658d3991e ("firmware: arm_scmi: power_control: Ensure SCMI_SYSPOWER_IDLE is set early during resume")
Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
---
drivers/firmware/arm_scmi/scmi_power_control.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_scmi/scmi_power_control.c b/drivers/firmware/arm_scmi/scmi_power_control.c
index ab0cee0d4bec..04202ff8094d 100644
--- a/drivers/firmware/arm_scmi/scmi_power_control.c
+++ b/drivers/firmware/arm_scmi/scmi_power_control.c
@@ -369,7 +369,7 @@ static int scmi_system_power_resume(struct device *dev)
}

static const struct dev_pm_ops scmi_system_power_pmops = {
- SET_SYSTEM_SLEEP_PM_OPS(NULL, scmi_system_power_resume)
+ SYSTEM_SLEEP_PM_OPS(NULL, scmi_system_power_resume)
};

static const struct scmi_device_id scmi_id_table[] = {

---
base-commit: 990e0418abe33d34e51a04cd7a71c2e044985836
change-id: 20250708-arm-scmi-modern-pm-ops-9c4e69c39698

Best regards,
--
Nathan Chancellor <nathan@xxxxxxxxxx>