summaryrefslogtreecommitdiff
path: root/fuzz/pchg_fuzz.c
diff options
context:
space:
mode:
Diffstat (limited to 'fuzz/pchg_fuzz.c')
-rw-r--r--fuzz/pchg_fuzz.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fuzz/pchg_fuzz.c b/fuzz/pchg_fuzz.c
index 06c94a2d83..9b265066d2 100644
--- a/fuzz/pchg_fuzz.c
+++ b/fuzz/pchg_fuzz.c
@@ -34,7 +34,6 @@ struct pchg pchgs[] = {
.events = QUEUE_NULL(PCHG_EVENT_QUEUE_SIZE, enum pchg_event),
},
};
-const int pchg_count = ARRAY_SIZE(pchgs);
static pthread_cond_t done_cond;
static pthread_mutex_t lock;
@@ -47,6 +46,11 @@ static uint8_t input[MAX_MESSAGE_SIZE * MAX_MESSAGES];
static uint8_t *head, *tail;
static bool data_available;
+int board_get_pchg_count(void)
+{
+ return ARRAY_SIZE(pchgs);
+}
+
int pchg_i2c_xfer(int port, uint16_t addr_flags, const uint8_t *out,
int out_size, uint8_t *in, int in_size, int flags)
{