diff options
Diffstat (limited to 'driver/ppc')
-rw-r--r-- | driver/ppc/nx20p348x.c | 6 | ||||
-rw-r--r-- | driver/ppc/sn5s330.c | 4 | ||||
-rw-r--r-- | driver/ppc/syv682x.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/driver/ppc/nx20p348x.c b/driver/ppc/nx20p348x.c index 4aa6700509..6836e336d3 100644 --- a/driver/ppc/nx20p348x.c +++ b/driver/ppc/nx20p348x.c @@ -25,10 +25,10 @@ static uint32_t irq_pending; /* Bitmask of ports signaling an interrupt. */ #define NX20P348X_DB_EXIT_FAIL_THRESHOLD 10 -static int db_exit_fail_count[CONFIG_USB_PD_PORT_COUNT]; +static int db_exit_fail_count[CONFIG_USB_PD_PORT_MAX_COUNT]; #define NX20P348X_FLAGS_SOURCE_ENABLED (1 << 0) -static uint8_t flags[CONFIG_USB_PD_PORT_COUNT]; +static uint8_t flags[CONFIG_USB_PD_PORT_MAX_COUNT]; static int read_reg(uint8_t port, int reg, int *regval) { @@ -384,7 +384,7 @@ static void nx20p348x_irq_deferred(void) int i; uint32_t pending = atomic_read_clear(&irq_pending); - for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; i++) + for (i = 0; i < CONFIG_USB_PD_PORT_MAX_COUNT; i++) if ((1 << i) & pending) nx20p348x_handle_interrupt(i); } diff --git a/driver/ppc/sn5s330.c b/driver/ppc/sn5s330.c index 6b48c8650b..5f5e877ae2 100644 --- a/driver/ppc/sn5s330.c +++ b/driver/ppc/sn5s330.c @@ -27,7 +27,7 @@ #define CPRINTS(format, args...) cprints(CC_USBPD, format, ## args) static uint32_t irq_pending; /* Bitmask of ports signaling an interrupt. */ -static int source_enabled[CONFIG_USB_PD_PORT_COUNT]; +static int source_enabled[CONFIG_USB_PD_PORT_MAX_COUNT]; static int read_reg(uint8_t port, int reg, int *regval) { @@ -672,7 +672,7 @@ static void sn5s330_irq_deferred(void) int i; uint32_t pending = atomic_read_clear(&irq_pending); - for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; i++) + for (i = 0; i < CONFIG_USB_PD_PORT_MAX_COUNT; i++) if ((1 << i) & pending) sn5s330_handle_interrupt(i); } diff --git a/driver/ppc/syv682x.c b/driver/ppc/syv682x.c index d7c050cbce..c69c984e46 100644 --- a/driver/ppc/syv682x.c +++ b/driver/ppc/syv682x.c @@ -17,7 +17,7 @@ /* 0 -> CC1, 1 -> CC2 */ #define SYV682X_FLAGS_CC_POLARITY (1 << 1) #define SYV682X_FLAGS_VBUS_PRESENT (1 << 2) -static uint8_t flags[CONFIG_USB_PD_PORT_COUNT]; +static uint8_t flags[CONFIG_USB_PD_PORT_MAX_COUNT]; #define SYV682X_VBUS_DET_THRESH_MV 4000 |