diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-11-23 11:19:39 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-12-21 14:28:40 +0100 |
commit | 8ac8baa42b00008958b1ebfe6d816fe8f3013624 (patch) | |
tree | aae0ee30ca79bc121b95d3b4b3cc88244b927c2c | |
parent | 22adfeb5967dc794da4bec42abad708328ff4ca2 (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>
-rw-r--r-- | arch/arm/mach-imx/common.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index c5a724e9988b..9cfaf2f12f33 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -194,8 +194,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); |