diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-06-05 00:58:46 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-06 13:09:55 -0700 |
commit | e8bfa7607342a21af06a0d365bf2f1d3062643bd (patch) | |
tree | 65771b961006cc0bd2c0ec9ccb1df8c8dea644e3 /drivers/tty | |
parent | 9f6d20ff848c23506c2ec55431479cb350179886 (diff) | |
download | op-kernel-dev-e8bfa7607342a21af06a0d365bf2f1d3062643bd.zip op-kernel-dev-e8bfa7607342a21af06a0d365bf2f1d3062643bd.tar.gz |
serial: imx: Fix warning when !CONFIG_SERIAL_IMX_CONSOLE
When CONFIG_SERIAL_IMX_CONSOLE is not selected the following build warnings
appear:
drivers/tty/serial/imx.c:274:13: warning: 'imx_port_ucrs_save' defined but not used [-Wunused-function]
drivers/tty/serial/imx.c:283:13: warning: 'imx_port_ucrs_restore' defined but not used [-Wunused-function]
imx_port_ucrs_save() and imx_port_ucrs_restore() are only used when
CONFIG_CONSOLE_POLL or CONFIG_SERIAL_IMX_CONSOLE are selected, so protect these
functions declaration with a proper ifdef.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/imx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 831324a..0478083 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -272,6 +272,7 @@ static inline int is_imx21_uart(struct imx_port *sport) /* * Save and restore functions for UCR1, UCR2 and UCR3 registers */ +#if defined(CONFIG_CONSOLE_POLL) || defined(CONFIG_SERIAL_IMX_CONSOLE) static void imx_port_ucrs_save(struct uart_port *port, struct imx_port_ucrs *ucr) { @@ -289,6 +290,7 @@ static void imx_port_ucrs_restore(struct uart_port *port, writel(ucr->ucr2, port->membase + UCR2); writel(ucr->ucr3, port->membase + UCR3); } +#endif /* * Handle any change of modem status signal since we were last called. |