summaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data/sa11x0-serial.h
diff options
context:
space:
mode:
authorArnd Bergmann2016-02-25 15:33:46 +0100
committerGreg Kroah-Hartman2016-03-08 01:11:14 +0100
commit0607616d9311096bfd1c325c36ffbfa71ccd40ab (patch)
tree4f74ccdd47473e0c2355c8f494b98467b8181a18 /include/linux/platform_data/sa11x0-serial.h
parenttty: serial: 8250: add MOXA Smartio MUE boards support (diff)
downloadkernel-qcow2-linux-0607616d9311096bfd1c325c36ffbfa71ccd40ab.tar.gz
kernel-qcow2-linux-0607616d9311096bfd1c325c36ffbfa71ccd40ab.tar.xz
kernel-qcow2-linux-0607616d9311096bfd1c325c36ffbfa71ccd40ab.zip
serial: sa1100: make sa1100_register_uart_fns a function
Calling sa1100_register_uart_fns() leaves the port structure unused when CONFIG_SERIAL_SA1100 is disabled, and we get a compiler warning about that: arch/arm/mach-sa1100/badge4.c:317:31: warning: 'badge4_port_fns' defined but not used [-Wunused-variable] static struct sa1100_port_fns badge4_port_fns __initdata = { This turns the two empty macros into empty inline functions, which has the same effect, but lets the compiler know that the variables are intentionally unused. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/platform_data/sa11x0-serial.h')
-rw-r--r--include/linux/platform_data/sa11x0-serial.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/platform_data/sa11x0-serial.h b/include/linux/platform_data/sa11x0-serial.h
index 4504d5d592f0..009e1d83fe39 100644
--- a/include/linux/platform_data/sa11x0-serial.h
+++ b/include/linux/platform_data/sa11x0-serial.h
@@ -26,8 +26,12 @@ struct sa1100_port_fns {
void sa1100_register_uart_fns(struct sa1100_port_fns *fns);
void sa1100_register_uart(int idx, int port);
#else
-#define sa1100_register_uart_fns(fns) do { } while (0)
-#define sa1100_register_uart(idx,port) do { } while (0)
+static inline void sa1100_register_uart_fns(struct sa1100_port_fns *fns)
+{
+}
+static inline void sa1100_register_uart(int idx, int port)
+{
+}
#endif
#endif