From f5dae73f4f7a8d1667fef490ddcd3114b01a61da Mon Sep 17 00:00:00 2001 From: Ting Shen Date: Fri, 6 Aug 2021 16:03:03 +0800 Subject: rt1718s: add proper define guard The original code can't compile if CONFIG_USB_PD_TCPC_LOW_POWER not defined. Compiler complains that tcpci_enter_low_power_mode not found. BUG=none TEST=make BRANCH=none Signed-off-by: Ting Shen Change-Id: If59bf9e82bf5db879d83eb02b64a36c32c9613b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3076474 Tested-by: Ting Shen Auto-Submit: Ting Shen Reviewed-by: Eric Yilun Lin Commit-Queue: Eric Yilun Lin --- driver/tcpm/rt1718s.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'driver/tcpm') diff --git a/driver/tcpm/rt1718s.c b/driver/tcpm/rt1718s.c index a2e05838de..631d98a522 100644 --- a/driver/tcpm/rt1718s.c +++ b/driver/tcpm/rt1718s.c @@ -369,6 +369,7 @@ static void rt1718s_alert(int port) tcpci_tcpc_alert(port); } +#ifdef CONFIG_USB_PD_TCPC_LOW_POWER static int rt1718s_enter_low_power_mode(int port) { /* enter low power mode */ @@ -382,6 +383,7 @@ static int rt1718s_enter_low_power_mode(int port) return tcpci_enter_low_power_mode(port); } +#endif /* RT1718S is a TCPCI compatible port controller */ const struct tcpm_drv rt1718s_tcpm_drv = { -- cgit v1.2.1