Skip to content

Commit

Permalink
m68knommu: Fix support for console port other than ttyS0 on mcf.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Len Sorensen authored and Greg Ungerer committed Mar 24, 2009
1 parent c315bd5 commit 4330e17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/mcf.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static int __init mcf_console_setup(struct console *co, char *options)
int parity = 'n';
int flow = 'n';

if ((co->index >= 0) && (co->index <= MCF_MAXPORTS))
if ((co->index < 0) || (co->index >= MCF_MAXPORTS))
co->index = 0;
port = &mcf_ports[co->index].port;
if (port->membase == 0)
Expand Down

0 comments on commit 4330e17

Please sign in to comment.