aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-06-04 23:58:46 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:00:49 -0400
commitfb21d10a11a4b9f773570604e674154481b8566e (patch)
tree9ace9e314f5165fe0a5981541e6e0c1103ad274c /drivers/tty
parentfa5c4962ff0886cdc38a43dc29def80a5a4c05ef (diff)
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> Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/imx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index d290274e063c..7a761f7c9781 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)
272/* 272/*
273 * Save and restore functions for UCR1, UCR2 and UCR3 registers 273 * Save and restore functions for UCR1, UCR2 and UCR3 registers
274 */ 274 */
275#if defined(CONFIG_CONSOLE_POLL) || defined(CONFIG_SERIAL_IMX_CONSOLE)
275static void imx_port_ucrs_save(struct uart_port *port, 276static void imx_port_ucrs_save(struct uart_port *port,
276 struct imx_port_ucrs *ucr) 277 struct imx_port_ucrs *ucr)
277{ 278{
@@ -289,6 +290,7 @@ static void imx_port_ucrs_restore(struct uart_port *port,
289 writel(ucr->ucr2, port->membase + UCR2); 290 writel(ucr->ucr2, port->membase + UCR2);
290 writel(ucr->ucr3, port->membase + UCR3); 291 writel(ucr->ucr3, port->membase + UCR3);
291} 292}
293#endif
292 294
293/* 295/*
294 * Handle any change of modem status signal since we were last called. 296 * Handle any change of modem status signal since we were last called.