diff options
author | Andrew McRae <amcrae@google.com> | 2019-11-01 15:35:35 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-02 08:20:02 +0000 |
commit | 511a810662b1133860737381103810b33cc96592 (patch) | |
tree | a5d641afd5876e7ae5cf256eea6af922789877ae /include/fan.h | |
parent | 9146a5e4a9eb1e1402ef61b23795b4ead4f17510 (diff) | |
download | chrome-ec-511a810662b1133860737381103810b33cc96592.tar.gz |
ec-fans: Make fans configuration const by default.
It was pointed out to me that the fans config list was non-const, but
there is only 2 boards that require non-const configuration, so
by default make it const, but allow an override.
BRANCH=none
BUG=None
TEST=EC compiles, make tests, buildall
Change-Id: I3ef8c72f6774e1a76584c47d89287f446199e0f2
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1893025
Reviewed-by: Andrew McRae <amcrae@chromium.org>
Tested-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
Diffstat (limited to 'include/fan.h')
-rw-r--r-- | include/fan.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/fan.h b/include/fan.h index 5a2c7a61c9..083feae4a9 100644 --- a/include/fan.h +++ b/include/fan.h @@ -38,7 +38,11 @@ struct fan_t { #define FAN_USE_FAST_START BIT(1) /* The list of fans is instantiated in board.c. */ +#ifdef CONFIG_FAN_DYNAMIC extern struct fan_t fans[]; +#else +extern const struct fan_t fans[]; +#endif /* For convenience */ #define FAN_CH(fan) fans[fan].conf->ch |