From e0ff1ce438225c3d8cf0acd21a4f3d73bf91737c Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 23 Nov 2017 11:19:39 +0100 Subject: ARM: imx: gpc: Fix undefined references when using GPCv2 When compiling a kernel with only GPCv2 support (e.g. only for i.MX 7) linking fails with the following errors: arch/arm/mach-imx/built-in.o: In function `imx_anatop_pre_suspend': platform-imx-dma.c:(.text+0xf50): undefined reference to `imx_gpc_usb_wakeup_enabled' platform-imx-dma.c:(.text+0xf5c): undefined reference to `imx_gpc_enet_wakeup_enabled' arch/arm/mach-imx/built-in.o: In function `imx_anatop_post_resume': platform-imx-dma.c:(.text+0x10cc): undefined reference to `imx_gpc_usb_wakeup_enabled' platform-imx-dma.c:(.text+0x10d8): undefined reference to `imx_gpc_enet_wakeup_enabled' Make sure the function exist even if GPC(v1) is not compiled in. Signed-off-by: Stefan Agner Acked-by: Marcel Ziswiler --- arch/arm/mach-imx/common.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/mach-imx/common.h') diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 02529cda7cb1..fd1077cc34a5 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -190,8 +190,13 @@ void imx6ul_low_power_idle(void); void imx6ull_low_power_idle(void); void imx6sl_low_power_idle(void); void imx6sll_low_power_idle(void); +#ifdef CONFIG_HAVE_IMX_GPC bool imx_gpc_usb_wakeup_enabled(void); bool imx_gpc_enet_wakeup_enabled(void); +#else +static inline bool imx_gpc_usb_wakeup_enabled(void) { return false; } +static inline bool imx_gpc_enet_wakeup_enabled(void) { return false; } +#endif #ifdef CONFIG_SUSPEND void v7_cpu_resume(void); -- cgit v1.2.3