summaryrefslogtreecommitdiff
path: root/common/host_command_pd.c
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@google.com>2016-11-14 14:48:56 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-11-16 07:09:28 -0800
commitbd60328a6e5f7f6199868f0d29414001f45d91d6 (patch)
treeb467e7a97f46a5380a3abd41bc907cea6bbed5e2 /common/host_command_pd.c
parentc66d36761f9b590f10218a434e0cf9a320fd4424 (diff)
downloadchrome-ec-bd60328a6e5f7f6199868f0d29414001f45d91d6.tar.gz
include/host_command: Conditionally define host event functions
Some functions are only defined if CONFIG_HOSTCMD_EVENTS is set, leading to link-time failures. In particular, do not call these functions from keyboard_scan, and do not define PD host event commands if the configuration option is not set. BRANCH=none BUG=chrome-os-partner:59083 TEST=make buildall -j Change-Id: I0da31cdec08f86f148aa883698a44f462de46d8e Reviewed-on: https://chromium-review.googlesource.com/410923 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/host_command_pd.c')
-rw-r--r--common/host_command_pd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/host_command_pd.c b/common/host_command_pd.c
index c3fc385216..831b6159bc 100644
--- a/common/host_command_pd.c
+++ b/common/host_command_pd.c
@@ -225,7 +225,7 @@ void pd_command_task(void)
}
}
-#ifdef USB_TCPM_WITH_OFF_CHIP_TCPC
+#if defined(USB_TCPM_WITH_OFF_CHIP_TCPC) && defined(CONFIG_HOSTCMD_EVENTS)
/*
* PD host event status for host command
* Note: this variable must be aligned on 4-byte boundary because we pass the