diff options
Diffstat (limited to 'common/charge_ramp_sw.c')
-rw-r--r-- | common/charge_ramp_sw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/charge_ramp_sw.c b/common/charge_ramp_sw.c index 1e1289654e..33dbff656b 100644 --- a/common/charge_ramp_sw.c +++ b/common/charge_ramp_sw.c @@ -59,8 +59,8 @@ struct oc_info { }; /* OCP info for each over-current */ -static struct oc_info oc_info[CONFIG_USB_PD_PORT_COUNT][RAMP_COUNT]; -static int oc_info_idx[CONFIG_USB_PD_PORT_COUNT]; +static struct oc_info oc_info[CONFIG_USB_PD_PORT_MAX_COUNT][RAMP_COUNT]; +static int oc_info_idx[CONFIG_USB_PD_PORT_MAX_COUNT]; #define ACTIVE_OC_INFO (oc_info[active_port][oc_info_idx[active_port]]) /* Active charging information */ @@ -157,7 +157,7 @@ void chg_ramp_task(void *u) int active_icl_new; /* Clear last OCP supplier to guarantee we ramp on first connect */ - for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; i++) + for (i = 0; i < CONFIG_USB_PD_PORT_MAX_COUNT; i++) oc_info[i][0].sup = CHARGE_SUPPLIER_NONE; /* @@ -364,7 +364,7 @@ static int command_chgramp(int argc, char **argv) ccprintf("Chg Ramp:\nState: %d\nMin ICL: %d\nActive ICL: %d\n", ramp_st, min_icl, active_icl); - for (port = 0; port < CONFIG_USB_PD_PORT_COUNT; port++) { + for (port = 0; port < CONFIG_USB_PD_PORT_MAX_COUNT; port++) { ccprintf("Port %d:\n", port); ccprintf(" OC idx:%d\n", oc_info_idx[port]); for (i = 0; i < RAMP_COUNT; i++) { |