summaryrefslogtreecommitdiff
path: root/components/drivers/pm/pm.c
diff options
context:
space:
mode:
authorsszlbg <[email protected]>2021-07-25 17:00:00 +0800
committersszlbg <[email protected]>2021-07-25 17:00:00 +0800
commitbf88963a3ec85ce6da013e4cd1c59ec5041d29e1 (patch)
treed4cd7d4fa3ff6e7b0c859a7660209787f47d168b /components/drivers/pm/pm.c
parent88d4faf68735948d6310e2d2271d576c5de254a0 (diff)
parent2b201cbb00c512def085332d7fb09194656418b9 (diff)
Merge branch 'master' into at_client-rt_realloc_iss
# Conflicts: # components/net/at/src/at_client.c
Diffstat (limited to 'components/drivers/pm/pm.c')
-rw-r--r--components/drivers/pm/pm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/components/drivers/pm/pm.c b/components/drivers/pm/pm.c
index 80ed101498..cf488a9ce1 100644
--- a/components/drivers/pm/pm.c
+++ b/components/drivers/pm/pm.c
@@ -836,12 +836,10 @@ rt_uint32_t rt_pm_module_get_status(void)
rt_uint32_t req_status = 0x00;
pm = &_pm;
- for (index = 0; index < 32; index ++)
+ for (index = 0; index < PM_MODULE_MAX_ID; index ++)
{
if (pm->module_status[index].req_status == 0x01)
req_status |= 1<<index;
- if (index >= PM_MODULE_MAX_ID)
- break;
}
return req_status;