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/sunsu.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/sunsu.c')
-rw-r--r-- | drivers/serial/sunsu.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 26d720baf88c..79b13685bdfa 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -1371,28 +1371,12 @@ static struct console sunsu_console = { | |||
1371 | * Register console. | 1371 | * Register console. |
1372 | */ | 1372 | */ |
1373 | 1373 | ||
1374 | static inline struct console *SUNSU_CONSOLE(int num_uart) | 1374 | static inline struct console *SUNSU_CONSOLE(void) |
1375 | { | 1375 | { |
1376 | int i; | ||
1377 | |||
1378 | if (con_is_present()) | ||
1379 | return NULL; | ||
1380 | |||
1381 | for (i = 0; i < num_uart; i++) { | ||
1382 | int this_minor = sunsu_reg.minor + i; | ||
1383 | |||
1384 | if ((this_minor - 64) == (serial_console - 1)) | ||
1385 | break; | ||
1386 | } | ||
1387 | if (i == num_uart) | ||
1388 | return NULL; | ||
1389 | |||
1390 | sunsu_console.index = i; | ||
1391 | |||
1392 | return &sunsu_console; | 1376 | return &sunsu_console; |
1393 | } | 1377 | } |
1394 | #else | 1378 | #else |
1395 | #define SUNSU_CONSOLE(num_uart) (NULL) | 1379 | #define SUNSU_CONSOLE() (NULL) |
1396 | #define sunsu_serial_console_init() do { } while (0) | 1380 | #define sunsu_serial_console_init() do { } while (0) |
1397 | #endif | 1381 | #endif |
1398 | 1382 | ||
@@ -1482,6 +1466,8 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m | |||
1482 | 1466 | ||
1483 | up->port.ops = &sunsu_pops; | 1467 | up->port.ops = &sunsu_pops; |
1484 | 1468 | ||
1469 | sunserial_console_match(SUNSU_CONSOLE(), dp, | ||
1470 | &sunsu_reg, up->port.line); | ||
1485 | err = uart_add_one_port(&sunsu_reg, &up->port); | 1471 | err = uart_add_one_port(&sunsu_reg, &up->port); |
1486 | if (err) | 1472 | if (err) |
1487 | goto out_unmap; | 1473 | goto out_unmap; |
@@ -1572,7 +1558,6 @@ static int __init sunsu_init(void) | |||
1572 | return err; | 1558 | return err; |
1573 | sunsu_reg.tty_driver->name_base = sunsu_reg.minor - 64; | 1559 | sunsu_reg.tty_driver->name_base = sunsu_reg.minor - 64; |
1574 | sunserial_current_minor += num_uart; | 1560 | sunserial_current_minor += num_uart; |
1575 | sunsu_reg.cons = SUNSU_CONSOLE(num_uart); | ||
1576 | } | 1561 | } |
1577 | 1562 | ||
1578 | err = of_register_driver(&su_driver, &of_bus_type); | 1563 | err = of_register_driver(&su_driver, &of_bus_type); |