pm: Reference pm_state_info only by pointer

It's unnecessary to move the pm_state_info around by value, just use a
pointer.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
Carlo Caione 2022-01-21 13:59:31 +01:00 committed by Anas Nashif
commit 11f1dd2370
27 changed files with 168 additions and 168 deletions

View file

@ -57,12 +57,12 @@ extern PowerCC26X2_ModuleState PowerCC26X2_module;
*/
/* Invoke Low Power/System Off specific Tasks */
__weak void pm_power_state_set(struct pm_state_info info)
__weak void pm_power_state_set(struct pm_state_info *info)
{
uint32_t modeVIMS;
uint32_t constraints;
LOG_DBG("SoC entering power state %d", info.state);
LOG_DBG("SoC entering power state %d", info->state);
/* Switch to using PRIMASK instead of BASEPRI register, since
* we are only able to wake up from standby while using PRIMASK.
@ -72,7 +72,7 @@ __weak void pm_power_state_set(struct pm_state_info info)
/* Set BASEPRI to 0 */
irq_unlock(0);
switch (info.state) {
switch (info->state) {
case PM_STATE_SUSPEND_TO_IDLE:
/* query the declared constraints */
constraints = Power_getConstraintMask();
@ -111,15 +111,15 @@ __weak void pm_power_state_set(struct pm_state_info info)
Power_shutdown(0, 0);
break;
default:
LOG_DBG("Unsupported power state %u", info.state);
LOG_DBG("Unsupported power state %u", info->state);
break;
}
LOG_DBG("SoC leaving power state %d", info.state);
LOG_DBG("SoC leaving power state %d", info->state);
}
/* Handle SOC specific activity after Low Power Mode Exit */
__weak void pm_power_state_exit_post_ops(struct pm_state_info info)
__weak void pm_power_state_exit_post_ops(struct pm_state_info *info)
{
/*
* System is now in active mode. Reenable interrupts which were disabled