diff options
author | Len Sorensen <lsorense@csclub.uwaterloo.ca> | 2009-02-04 19:11:24 -0500 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2009-03-24 01:17:43 -0400 |
commit | 4330e179a96bc9310d36e9b858bc8f275f329312 (patch) | |
tree | c173ef0aff6f0285b805b87194f2a0575542c143 /drivers/serial/mcf.c | |
parent | c315bd5fdd2a949a9ccc22b2c64ee694602682d4 (diff) |
m68knommu: Fix support for console port other than ttyS0 on mcf.c
Due to a case of backwards logic, mfc.c always makes the console port be
ttyS0 even when you ask for another port.
This patch fixes this issue.
Only when the requested port is NOT in the range 0 to MAXPORTS-1 do we
force it to be treated as if port 0 was requested. Forcing the port to
0 when it is in fact in the range 0 to MAXPORTS is not helpful.
Tested with working console on ttyS2 on a 5271evb.
Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'drivers/serial/mcf.c')
-rw-r--r-- | drivers/serial/mcf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c index 56841fe5f483..0eefb07bebaf 100644 --- a/drivers/serial/mcf.c +++ b/drivers/serial/mcf.c | |||
@@ -513,7 +513,7 @@ static int __init mcf_console_setup(struct console *co, char *options) | |||
513 | int parity = 'n'; | 513 | int parity = 'n'; |
514 | int flow = 'n'; | 514 | int flow = 'n'; |
515 | 515 | ||
516 | if ((co->index >= 0) && (co->index <= MCF_MAXPORTS)) | 516 | if ((co->index < 0) || (co->index >= MCF_MAXPORTS)) |
517 | co->index = 0; | 517 | co->index = 0; |
518 | port = &mcf_ports[co->index].port; | 518 | port = &mcf_ports[co->index].port; |
519 | if (port->membase == 0) | 519 | if (port->membase == 0) |