aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/cpm_uart/cpm_uart_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/cpm_uart/cpm_uart_core.c')
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 969f949004318b..5cba59ad7dc5a3 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -1164,14 +1164,16 @@ static int __init cpm_uart_console_setup(struct console *co, char *options)
struct fs_uart_platform_info *pdata;
struct platform_device* pdev = early_uart_get_pdev(co->index);
- port =
- (struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]];
- pinfo = (struct uart_cpm_port *)port;
if (!pdev) {
pr_info("cpm_uart: console: compat mode\n");
/* compatibility - will be cleaned up */
cpm_uart_init_portdesc();
+ }
+ port =
+ (struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]];
+ pinfo = (struct uart_cpm_port *)port;
+ if (!pdev) {
if (pinfo->set_lineif)
pinfo->set_lineif(pinfo);
} else {