Kyösti Mälkki has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34944 )
Change subject: ec/google/chromeec: Use MAYBE_STATIC ......................................................................
ec/google/chromeec: Use MAYBE_STATIC
Change-Id: I4c6238b0e5f41fcc667baf6b486c7fff4c90a7cb Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/34944 Reviewed-by: Furquan Shaikh furquan@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/ec/google/chromeec/ec_lpc.c 1 file changed, 2 insertions(+), 16 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c index b7d183e..7dae6a2 100644 --- a/src/ec/google/chromeec/ec_lpc.c +++ b/src/ec/google/chromeec/ec_lpc.c @@ -399,24 +399,9 @@ *out_size = size; }
-#ifdef __PRE_RAM__ - int google_chromeec_command(struct chromeec_command *cec_command) { - switch (google_chromeec_command_version()) { - case EC_HOST_CMD_FLAG_VERSION_3: - return google_chromeec_command_v3(cec_command); - case EC_HOST_CMD_FLAG_LPC_ARGS_SUPPORTED: - return google_chromeec_command_v1(cec_command); - } - return -1; -} - -#else /* !__PRE_RAM__ */ - -int google_chromeec_command(struct chromeec_command *cec_command) -{ - static int command_version = 0; + MAYBE_STATIC int command_version = 0;
if (command_version <= 0) command_version = google_chromeec_command_version(); @@ -430,6 +415,7 @@ return -1; }
+#ifndef __PRE_RAM__ #ifndef __SMM__ static void lpc_ec_init(struct device *dev) {