From 8e8bc38d03ca4338955cc9478abb1e80358bbcae Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 4 Mar 2021 14:56:31 -0800 Subject: board/lazor: Move enum definition before its use board/lazor/board.h:121:6: error: ISO C++ forbids forward references to 'enum' types enum battery_cell_type board_get_battery_cell_type(void); ^ BRANCH=none BUG=b:144959033 TEST=none Signed-off-by: Tom Hughes Change-Id: Id2abde06326a0fe9297b98127aa7ef6768ce1479 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2740564 Reviewed-by: Jack Rosenthal --- board/lazor/board.h | 7 +++++++ driver/ln9310.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/board/lazor/board.h b/board/lazor/board.h index 47e5574ded..46e9c7b7dd 100644 --- a/board/lazor/board.h +++ b/board/lazor/board.h @@ -114,6 +114,13 @@ enum battery_type { BATTERY_TYPE_COUNT, }; +/* Battery cell type */ +enum battery_cell_type { + BATTERY_CELL_TYPE_UNKNOWN = 0, + BATTERY_CELL_TYPE_2S = 2, + BATTERY_CELL_TYPE_3S = 3 +}; + /* Swithcap functions */ void board_set_switchcap_power(int enable); int board_is_switchcap_enabled(void); diff --git a/driver/ln9310.h b/driver/ln9310.h index 34cf5fffea..4cdcb156f5 100644 --- a/driver/ln9310.h +++ b/driver/ln9310.h @@ -167,13 +167,6 @@ /* LN9310 Timing definition */ #define LN9310_CDC_DELAY 120 /* 120us */ -/* Battery cell type */ -enum battery_cell_type { - BATTERY_CELL_TYPE_UNKNOWN = 0, - BATTERY_CELL_TYPE_2S = 2, - BATTERY_CELL_TYPE_3S = 3 -}; - /* Define configuration of LN9310 part */ struct ln9310_config_t { const int i2c_port; -- cgit v1.2.1