提交 93d94b37 编写于 作者: F Fabio Estevam 提交者: Greg Kroah-Hartman

serial: imx: Fix warning when building 'allmodconfig'

When CONFIG_SERIAL_IMX_CONSOLE=n and CONFIG_CONSOLE_POLL=y we get the following
build warning:

drivers/tty/serial/imx.c:306:13: warning: 'imx_port_ucrs_save' defined but not used [-Wunused-function]
drivers/tty/serial/imx.c:315:13: warning: 'imx_port_ucrs_restore' defined but not used [-Wunused-function]

imx_port_ucrs_save/restore are only used under CONFIG_SERIAL_IMX_CONSOLE, so
their definitions should be also be protected only by CONFIG_SERIAL_IMX_CONSOLE.

This was detected when building 'allmodconfig'.
Reported-by: NOlof's autobuilder <build@lixom.net>
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b725680f
...@@ -302,7 +302,7 @@ static inline int is_imx6q_uart(struct imx_port *sport) ...@@ -302,7 +302,7 @@ static inline int is_imx6q_uart(struct imx_port *sport)
/* /*
* Save and restore functions for UCR1, UCR2 and UCR3 registers * Save and restore functions for UCR1, UCR2 and UCR3 registers
*/ */
#if defined(CONFIG_CONSOLE_POLL) || defined(CONFIG_SERIAL_IMX_CONSOLE) #if defined(CONFIG_SERIAL_IMX_CONSOLE)
static void imx_port_ucrs_save(struct uart_port *port, static void imx_port_ucrs_save(struct uart_port *port,
struct imx_port_ucrs *ucr) struct imx_port_ucrs *ucr)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册