summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/common.h
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-11-23 11:19:39 +0100
committerPhilippe Schenker <philippe.schenker@toradex.com>2019-05-24 11:34:16 +0200
commite0ff1ce438225c3d8cf0acd21a4f3d73bf91737c (patch)
treeb26cac2851087ab864cb9775a86adb0a058c4c5b /arch/arm/mach-imx/common.h
parentbfbaca11a1bc30f61358064808942e920f022dda (diff)
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 <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'arch/arm/mach-imx/common.h')
-rw-r--r--arch/arm/mach-imx/common.h5
1 files changed, 5 insertions, 0 deletions
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);