diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-06-09 13:18:02 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-06-13 12:51:11 +0300 |
commit | be36e000bc2d28512721c6e09c3df920b1bfad5e (patch) | |
tree | ba7a6defc51a1d0cbc077ce1908145f3f13dce81 /include/linux/platform_data | |
parent | 63e07c0fdc41d7d585dad72ed01856c68ce52bbe (diff) | |
download | linux-be36e000bc2d28512721c6e09c3df920b1bfad5e.tar.xz |
ARM: at91: fix at91_suspend_entering_slow_clock link error
When CONFIG_ARCH_AT91 is enabled, but none of the specific SoC support
is in use, some at91 specific drivers fail to link:
drivers/tty/serial/atmel_serial.o: In function `atmel_serial_suspend':
atmel_serial.c:(.text.atmel_serial_suspend+0x1e): undefined reference to `at91_suspend_entering_slow_clock'
drivers/usb/host/ohci-at91.o: In function `ohci_hcd_at91_drv_suspend':
ohci-at91.c:(.text.ohci_hcd_at91_drv_suspend+0x12): undefined reference to `at91_suspend_entering_slow_clock'
drivers/usb/gadget/udc/at91_udc.o: In function `at91udc_suspend':
at91_udc.c:(.text.at91udc_suspend+0x26): undefined reference to `at91_suspend_entering_slow_clock'
This changes the at91_suspend_entering_slow_clock hack once more, adding
an alternative inline implementation that is used exactly in those cases
that don't provide the normal implementation.
Fixes: c1892c2379d2 ("ARM: at91: handle CONFIG_PM for armv7m configurations")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r-- | include/linux/platform_data/atmel.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h index 3c8825b67298..7b6dce7d6d33 100644 --- a/include/linux/platform_data/atmel.h +++ b/include/linux/platform_data/atmel.h @@ -52,6 +52,13 @@ struct atmel_uart_data { }; /* FIXME: this needs a better location, but gets stuff building again */ +#ifdef CONFIG_ATMEL_PM extern int at91_suspend_entering_slow_clock(void); +#else +static inline int at91_suspend_entering_slow_clock(void) +{ + return 0; +} +#endif #endif /* __ATMEL_H__ */ |