summaryrefslogtreecommitdiff
path: root/driver/charger/bd9995x.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/charger/bd9995x.c')
-rw-r--r--driver/charger/bd9995x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/charger/bd9995x.c b/driver/charger/bd9995x.c
index dc3125928f..23303589b6 100644
--- a/driver/charger/bd9995x.c
+++ b/driver/charger/bd9995x.c
@@ -1273,7 +1273,7 @@ void usb_charger_task(void *u)
vbus_voltage = 0;
#endif
- for (port = 0; port < CONFIG_USB_PD_PORT_MAX_COUNT; port++) {
+ for (port = 0; port < board_get_usb_pd_port_count(); port++) {
bc12_detected_type[port] = CHARGE_SUPPLIER_NONE;
bd9995x_enable_vbus_detect_interrupts(port, 1);
bc12_det_mark[port] = 0;
@@ -1282,7 +1282,7 @@ void usb_charger_task(void *u)
while (1) {
sleep_usec = -1;
changed = 0;
- for (port = 0; port < CONFIG_USB_PD_PORT_MAX_COUNT; port++) {
+ for (port = 0; port < board_get_usb_pd_port_count(); port++) {
/* Get port interrupts */
interrupts = bd9995x_get_interrupts(port);
if (interrupts & BD9995X_CMD_INT_VBUS_DET ||