aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorSoren Brinkmann <soren.brinkmann@xilinx.com>2013-10-21 19:41:00 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-29 12:26:11 -0400
commitd3641f64bc71765682754722fd42fae24366bb3a (patch)
tree59b2273f71fbc91dbf4ba1d13338d45562f6edd4 /drivers/tty/serial
parentd54b181ea65682914cae0430f2a1efcbb6517dba (diff)
tty: xuartps: Fix build error due to missing forward declaration
If CONFIG_PM_SLEEP is enabled and CONFIG_SERIAL_XILINX_PS_UART_CONSOLE is not, a forward declaration of the uart_driver struct is not included, leading to a build error due to an undeclared variable. Fixing this by moving the definition of the struct uart_driver before the definition of the suspend/resume callbacks. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/xilinx_uartps.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 5ac6c480df43..ca4a2f1fbca9 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1198,6 +1198,20 @@ console_initcall(xuartps_console_init);
1198 1198
1199#endif /* CONFIG_SERIAL_XILINX_PS_UART_CONSOLE */ 1199#endif /* CONFIG_SERIAL_XILINX_PS_UART_CONSOLE */
1200 1200
1201/** Structure Definitions
1202 */
1203static struct uart_driver xuartps_uart_driver = {
1204 .owner = THIS_MODULE, /* Owner */
1205 .driver_name = XUARTPS_NAME, /* Driver name */
1206 .dev_name = XUARTPS_TTY_NAME, /* Node name */
1207 .major = XUARTPS_MAJOR, /* Major number */
1208 .minor = XUARTPS_MINOR, /* Minor number */
1209 .nr = XUARTPS_NR_PORTS, /* Number of UART ports */
1210#ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE
1211 .cons = &xuartps_console, /* Console */
1212#endif
1213};
1214
1201#ifdef CONFIG_PM_SLEEP 1215#ifdef CONFIG_PM_SLEEP
1202/** 1216/**
1203 * xuartps_suspend - suspend event 1217 * xuartps_suspend - suspend event
@@ -1311,20 +1325,6 @@ static int xuartps_resume(struct device *device)
1311 1325
1312static SIMPLE_DEV_PM_OPS(xuartps_dev_pm_ops, xuartps_suspend, xuartps_resume); 1326static SIMPLE_DEV_PM_OPS(xuartps_dev_pm_ops, xuartps_suspend, xuartps_resume);
1313 1327
1314/** Structure Definitions
1315 */
1316static struct uart_driver xuartps_uart_driver = {
1317 .owner = THIS_MODULE, /* Owner */
1318 .driver_name = XUARTPS_NAME, /* Driver name */
1319 .dev_name = XUARTPS_TTY_NAME, /* Node name */
1320 .major = XUARTPS_MAJOR, /* Major number */
1321 .minor = XUARTPS_MINOR, /* Minor number */
1322 .nr = XUARTPS_NR_PORTS, /* Number of UART ports */
1323#ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE
1324 .cons = &xuartps_console, /* Console */
1325#endif
1326};
1327
1328/* --------------------------------------------------------------------- 1328/* ---------------------------------------------------------------------
1329 * Platform bus binding 1329 * Platform bus binding
1330 */ 1330 */