diff options
author | Peter Marheine <pmarheine@chromium.org> | 2020-07-01 16:20:16 +1000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-01 18:33:49 +0000 |
commit | 70ff3fbb9d7ebf9a20b42fecf7cdac0639347f7a (patch) | |
tree | 6e41d8fc095553275ea52c0f428eb1d1b5968a5a /common/mock/tcpc_mock.c | |
parent | eccff54c3a6ae63f77fbc8544f770fae1f100715 (diff) | |
download | chrome-ec-70ff3fbb9d7ebf9a20b42fecf7cdac0639347f7a.tar.gz |
tcpm: allow returning a status from set_frs_enable
The old declaration with void is incompatible with the use of
tcpci_tcpc_fast_role_swap_enable in the one driver that currently
implements that function, causing build failure when
CONFIG_USB_PC_FRS_TCPC is enabled and using the nct38xx TCPC driver.
Because the underlying function may fail, walk up the stack and make all
users capable of failure as well (however the top level user currently
ignores the result).
BUG=b:146393213
BRANCH=None
TEST=make buildall
Change-Id: Ib8cabf4a435731ed804a3cc4696dfea97eef3c98
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276124
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common/mock/tcpc_mock.c')
-rw-r--r-- | common/mock/tcpc_mock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/mock/tcpc_mock.c b/common/mock/tcpc_mock.c index 27b79af989..6dd5da7248 100644 --- a/common/mock/tcpc_mock.c +++ b/common/mock/tcpc_mock.c @@ -166,8 +166,9 @@ __maybe_unused static int mock_enter_low_power_mode(int port) return EC_SUCCESS; } -void mock_set_frs_enable(int port, int enable) +int mock_set_frs_enable(int port, int enable) { + return EC_SUCCESS; } const struct tcpm_drv mock_tcpc_driver = { |