mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
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>
This commit is contained in:
parent
c216c4ad59
commit
0607616d93
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue