From d31a9be27ccc0d7d0710c4cd5e30b0335fe8a4c2 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Mon, 3 May 2021 17:42:31 +0200 Subject: [PATCH] pm: device: rename device_pm struct to pm_device Prefix all PM related functions/structures with pm. Signed-off-by: Gerard Marull-Paretas --- include/device.h | 4 ++-- include/pm/device.h | 2 +- kernel/device.c | 2 +- subsys/pm/device_pm.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/device.h b/include/device.h index bc5bca208c5..3b8e34332c9 100644 --- a/include/device.h +++ b/include/device.h @@ -358,7 +358,7 @@ struct device_state { #ifdef CONFIG_PM_DEVICE /* Power management data */ - struct device_pm pm; + struct pm_device pm; #endif /* CONFIG_PM_DEVICE */ }; @@ -389,7 +389,7 @@ struct device { int (*device_pm_control)(const struct device *dev, uint32_t command, void *context, device_pm_cb cb, void *arg); /** Pointer to device instance power management data */ - struct device_pm * const pm; + struct pm_device * const pm; #endif }; diff --git a/include/pm/device.h b/include/pm/device.h index 4b04906ce0b..2d1e87fb804 100644 --- a/include/pm/device.h +++ b/include/pm/device.h @@ -83,7 +83,7 @@ typedef void (*device_pm_cb)(const struct device *dev, /** * @brief Device PM info */ -struct device_pm { +struct pm_device { /** Pointer to the device */ const struct device *dev; /** Lock to synchronize the get/put operations */ diff --git a/kernel/device.c b/kernel/device.c index 5a9280e0935..4c8cb9899fb 100644 --- a/kernel/device.c +++ b/kernel/device.c @@ -28,7 +28,7 @@ extern uint32_t __device_init_status_start[]; static inline void device_pm_state_init(const struct device *dev) { #ifdef CONFIG_PM_DEVICE - *dev->pm = (struct device_pm){ + *dev->pm = (struct pm_device){ .usage = ATOMIC_INIT(0), .lock = Z_SEM_INITIALIZER(dev->pm->lock, 1, 1), .signal = K_POLL_SIGNAL_INITIALIZER(dev->pm->signal), diff --git a/subsys/pm/device_pm.c b/subsys/pm/device_pm.c index 2f31f6d7819..c8803558686 100644 --- a/subsys/pm/device_pm.c +++ b/subsys/pm/device_pm.c @@ -45,8 +45,8 @@ static void device_pm_callback(const struct device *dev, static void pm_work_handler(struct k_work *work) { - struct device_pm *pm = CONTAINER_OF(work, - struct device_pm, work); + struct pm_device *pm = CONTAINER_OF(work, + struct pm_device, work); const struct device *dev = pm->dev; int ret = 0; uint8_t pm_state;