summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zephyr/shim/chip/it8xxx2/power_policy.c6
-rw-r--r--zephyr/shim/chip/npcx/power_policy.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/zephyr/shim/chip/it8xxx2/power_policy.c b/zephyr/shim/chip/it8xxx2/power_policy.c
index 62e2a14ab8..42f857836c 100644
--- a/zephyr/shim/chip/it8xxx2/power_policy.c
+++ b/zephyr/shim/chip/it8xxx2/power_policy.c
@@ -14,7 +14,7 @@ static const struct pm_state_info pm_states[] =
PM_STATE_INFO_LIST_FROM_DT_CPU(DT_NODELABEL(cpu0));
/* CROS PM policy handler */
-struct pm_state_info pm_policy_next_state(uint8_t cpu, int32_t ticks)
+const struct pm_state_info *pm_policy_next_state(uint8_t cpu, int32_t ticks)
{
ARG_UNUSED(cpu);
@@ -33,9 +33,9 @@ struct pm_state_info pm_policy_next_state(uint8_t cpu, int32_t ticks)
continue;
}
- return pm_states[i];
+ return &pm_states[i];
}
}
- return (struct pm_state_info){PM_STATE_ACTIVE, 0, 0};
+ return NULL;
}
diff --git a/zephyr/shim/chip/npcx/power_policy.c b/zephyr/shim/chip/npcx/power_policy.c
index 5c6b4dc309..2953777965 100644
--- a/zephyr/shim/chip/npcx/power_policy.c
+++ b/zephyr/shim/chip/npcx/power_policy.c
@@ -16,7 +16,7 @@ static const struct pm_state_info residency_info[] =
PM_STATE_INFO_LIST_FROM_DT_CPU(DT_NODELABEL(cpu0));
/* CROS PM policy handler */
-struct pm_state_info pm_policy_next_state(uint8_t cpu, int32_t ticks)
+const struct pm_state_info *pm_policy_next_state(uint8_t cpu, int32_t ticks)
{
ARG_UNUSED(cpu);
@@ -31,10 +31,10 @@ struct pm_state_info pm_policy_next_state(uint8_t cpu, int32_t ticks)
ticks >= k_us_to_ticks_ceil32(
residency_info[i]
.min_residency_us)) {
- return residency_info[i];
+ return &residency_info[i];
}
}
}
- return (struct pm_state_info){ PM_STATE_ACTIVE, 0, 0 };
+ return NULL;
}