diff options
-rw-r--r-- | common/usb_pd_tcpc.c | 2 | ||||
-rw-r--r-- | driver/tcpm/it83xx.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_pd_tcpc.c b/common/usb_pd_tcpc.c index a7ed832a0c..8e6b9dda5e 100644 --- a/common/usb_pd_tcpc.c +++ b/common/usb_pd_tcpc.c @@ -1022,7 +1022,7 @@ int tcpc_set_rx_enable(int port, int enable) #if defined(CONFIG_LOW_POWER_IDLE) && !defined(CONFIG_USB_POWER_DELIVERY) /* If any PD port is connected, then disable deep sleep */ for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; ++i) - if (pd[port].rx_enabled) + if (pd[i].rx_enabled) break; if (i == CONFIG_USB_PD_PORT_COUNT) diff --git a/driver/tcpm/it83xx.c b/driver/tcpm/it83xx.c index 4a1257514b..dadfc2393b 100644 --- a/driver/tcpm/it83xx.c +++ b/driver/tcpm/it83xx.c @@ -385,7 +385,7 @@ static int it83xx_tcpm_set_rx_enable(int port, int enable) /* If any PD port is connected, then disable deep sleep */ for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; ++i) - if (IT83XX_USBPD_GCR(port) | USBPD_REG_MASK_BMC_PHY) + if (IT83XX_USBPD_GCR(i) | USBPD_REG_MASK_BMC_PHY) break; if (i == CONFIG_USB_PD_PORT_COUNT) |