From 570b43a70ed99902970a8073bbf43d629107921d Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Mon, 3 May 2021 17:45:25 +0200 Subject: [PATCH] pm: rename device_pm_state_str to pm_device_state_str Prefix all device PM functions/data structures with pm. Signed-off-by: Gerard Marull-Paretas --- include/pm/device.h | 2 +- subsys/pm/device.c | 4 ++-- subsys/shell/modules/device_service.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/pm/device.h b/include/pm/device.h index 2d1e87fb804..ef8fccdc023 100644 --- a/include/pm/device.h +++ b/include/pm/device.h @@ -115,7 +115,7 @@ struct pm_device { * * @param state State id which name should be returned */ -const char *device_pm_state_str(uint32_t state); +const char *pm_device_state_str(uint32_t state); /** Alias for legacy use of device_pm_control_nop */ #define device_pm_control_nop __DEPRECATED_MACRO NULL diff --git a/subsys/pm/device.c b/subsys/pm/device.c index 9fbb4de8801..d61c644236b 100644 --- a/subsys/pm/device.c +++ b/subsys/pm/device.c @@ -75,7 +75,7 @@ static int _pm_devices(uint32_t state) rc = device_set_power_state(dev, state, NULL, NULL); if ((rc != -ENOTSUP) && (rc != 0)) { LOG_DBG("%s did not enter %s state: %d", - dev->name, device_pm_state_str(state), rc); + dev->name, pm_device_state_str(state), rc); return rc; } @@ -165,7 +165,7 @@ void pm_create_device_list(void) } #endif /* defined(CONFIG_PM) */ -const char *device_pm_state_str(uint32_t state) +const char *pm_device_state_str(uint32_t state) { switch (state) { case PM_DEVICE_ACTIVE_STATE: diff --git a/subsys/shell/modules/device_service.c b/subsys/shell/modules/device_service.c index 4262bb9b078..382c6c9370a 100644 --- a/subsys/shell/modules/device_service.c +++ b/subsys/shell/modules/device_service.c @@ -150,7 +150,7 @@ static int cmd_device_list(const struct shell *shell, int err = device_get_power_state(dev, &st); if (!err) { - state = device_pm_state_str(st); + state = pm_device_state_str(st); } #endif /* CONFIG_PM_DEVICE */ }