pm: define PM_STATE_COUNT to obtain number of states

Replace PM_STATE_LEN with PM_STATE_COUNT, so that number of states is
automatically computed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-11-22 18:48:01 +01:00 committed by Carles Cufí
commit cd7ae8ea62
3 changed files with 11 additions and 12 deletions

View file

@ -103,7 +103,9 @@ enum pm_state {
*
* @note This state is correlated with ACPI G2/S5 state
*/
PM_STATE_SOFT_OFF
PM_STATE_SOFT_OFF,
/** Number of power management states (internal use) */
PM_STATE_COUNT,
};
/**