diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-20 20:35:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-20 20:35:25 -0400 |
commit | c2e68052429fdf87702fccd272951282bef1c60a (patch) | |
tree | b9f3bf3918526af068ed264190a85fb18dd3d8b0 /drivers/serial/sunzilog.c | |
parent | d6f410bdbcb435c744c4f8259d6659ae2c6e447a (diff) | |
parent | 1256efd5519a8eca2dfa6039ce5cf58f44d1626d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: fix section mismatch warning in mdesc.c
[SPARC64]: fix section mismatch warning in pci_sunv4
[SPARC64]: Stop using drivers/char/rtc.c
[SPARC64]: Convert parport to of_platform_driver.
[SPARC]: Implement fb_is_primary_device().
[SPARC64]: Fix virq decomposition.
[SPARC64]: Use KERN_ERR in IRQ manipulation error printks.
[SPARC64]: Do not flood log with failed DS messages.
[SPARC64]: Add proper multicast support to VNET driver.
[SPARC64]: Handle multiple domain-services-port nodes properly.
[SPARC64]: Improve VIO device naming further.
[SPARC]: Make sure dev_archdata is filled in for all devices.
[SPARC]: Define minimal struct dev_archdata, similarly to sparc64.
[SPARC]: Fix serial console device detection.
Diffstat (limited to 'drivers/serial/sunzilog.c')
-rw-r--r-- | drivers/serial/sunzilog.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 0a3e10a4a35d..1d262c0c613f 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
@@ -1226,23 +1226,6 @@ static struct console sunzilog_console_ops = { | |||
1226 | 1226 | ||
1227 | static inline struct console *SUNZILOG_CONSOLE(void) | 1227 | static inline struct console *SUNZILOG_CONSOLE(void) |
1228 | { | 1228 | { |
1229 | int i; | ||
1230 | |||
1231 | if (con_is_present()) | ||
1232 | return NULL; | ||
1233 | |||
1234 | for (i = 0; i < NUM_CHANNELS; i++) { | ||
1235 | int this_minor = sunzilog_reg.minor + i; | ||
1236 | |||
1237 | if ((this_minor - 64) == (serial_console - 1)) | ||
1238 | break; | ||
1239 | } | ||
1240 | if (i == NUM_CHANNELS) | ||
1241 | return NULL; | ||
1242 | |||
1243 | sunzilog_console_ops.index = i; | ||
1244 | sunzilog_port_table[i].flags |= SUNZILOG_FLAG_IS_CONS; | ||
1245 | |||
1246 | return &sunzilog_console_ops; | 1229 | return &sunzilog_console_ops; |
1247 | } | 1230 | } |
1248 | 1231 | ||
@@ -1428,12 +1411,18 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
1428 | sunzilog_init_hw(&up[1]); | 1411 | sunzilog_init_hw(&up[1]); |
1429 | 1412 | ||
1430 | if (!keyboard_mouse) { | 1413 | if (!keyboard_mouse) { |
1414 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node, | ||
1415 | &sunzilog_reg, up[0].port.line)) | ||
1416 | up->flags |= SUNZILOG_FLAG_IS_CONS; | ||
1431 | err = uart_add_one_port(&sunzilog_reg, &up[0].port); | 1417 | err = uart_add_one_port(&sunzilog_reg, &up[0].port); |
1432 | if (err) { | 1418 | if (err) { |
1433 | of_iounmap(&op->resource[0], | 1419 | of_iounmap(&op->resource[0], |
1434 | rp, sizeof(struct zilog_layout)); | 1420 | rp, sizeof(struct zilog_layout)); |
1435 | return err; | 1421 | return err; |
1436 | } | 1422 | } |
1423 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node, | ||
1424 | &sunzilog_reg, up[1].port.line)) | ||
1425 | up->flags |= SUNZILOG_FLAG_IS_CONS; | ||
1437 | err = uart_add_one_port(&sunzilog_reg, &up[1].port); | 1426 | err = uart_add_one_port(&sunzilog_reg, &up[1].port); |
1438 | if (err) { | 1427 | if (err) { |
1439 | uart_remove_one_port(&sunzilog_reg, &up[0].port); | 1428 | uart_remove_one_port(&sunzilog_reg, &up[0].port); |
@@ -1531,7 +1520,6 @@ static int __init sunzilog_init(void) | |||
1531 | goto out_free_tables; | 1520 | goto out_free_tables; |
1532 | 1521 | ||
1533 | sunzilog_reg.tty_driver->name_base = sunzilog_reg.minor - 64; | 1522 | sunzilog_reg.tty_driver->name_base = sunzilog_reg.minor - 64; |
1534 | sunzilog_reg.cons = SUNZILOG_CONSOLE(); | ||
1535 | 1523 | ||
1536 | sunserial_current_minor += uart_count; | 1524 | sunserial_current_minor += uart_count; |
1537 | } | 1525 | } |