diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-08-17 11:11:57 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-08-17 11:11:57 +1000 |
commit | 0ae1cb91e6958e9c2826d33dbf92566ae7a7f178 (patch) | |
tree | 19396873b1800147bcd4bb2b7fb8a02405ab74a5 /drivers | |
parent | 95a2e736900ef2390ff80f739f135f30c3fdd76f (diff) | |
parent | 0a492896ac07336c98f37ad7fab4a6387b6ada78 (diff) |
Merge remote branch 'sparc-current/master'
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/suncore.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c index 544f2e25d0e5..6381a0282ee7 100644 --- a/drivers/serial/suncore.c +++ b/drivers/serial/suncore.c @@ -55,7 +55,12 @@ EXPORT_SYMBOL(sunserial_unregister_minors); int sunserial_console_match(struct console *con, struct device_node *dp, struct uart_driver *drv, int line, bool ignore_line) { - if (!con || of_console_device != dp) + if (!con) + return 0; + + drv->cons = con; + + if (of_console_device != dp) return 0; if (!ignore_line) { @@ -69,12 +74,10 @@ int sunserial_console_match(struct console *con, struct device_node *dp, return 0; } - con->index = line; - drv->cons = con; - - if (!console_set_on_cmdline) + if (!console_set_on_cmdline) { + con->index = line; add_preferred_console(con->name, line, NULL); - + } return 1; } EXPORT_SYMBOL(sunserial_console_match); |