diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-11-23 11:19:39 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-12-24 01:27:30 +0100 |
commit | 35de8c706b04ab397fe1295c8b2693ae065e1fcc (patch) | |
tree | 6c1b0100c3924200493eed947eb05a85e24fe1dd /arch/arm/mach-imx | |
parent | d54ff0d73c8dabc52688f3522106cfeb1b62eb36 (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')
-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 dc524887b6d1..27a9092db600 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); |