Skip to content

Commit

Permalink
[POWERPC] of_serial: Ignore unknown serial port
Browse files Browse the repository at this point in the history
Current of_serial driver assumes unknown serial port to be 8250.  But
this behavior may cause fatal problems when the serial port is not
8250.  This corrects probe routine to ignore unknown serial port.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Ishizaki Kou authored and Paul Mackerras committed Jul 10, 2007
1 parent f716a42 commit 1558f9b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/serial/of_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,13 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev,
goto out;

switch (port_type) {
case PORT_UNKNOWN:
dev_info(&ofdev->dev, "Unknown serial port found, "
"attempting to use 8250 driver\n");
/* fallthrough */
case PORT_8250 ... PORT_MAX_8250:
ret = serial8250_register_port(&port);
break;
default:
/* need to add code for these */
case PORT_UNKNOWN:
dev_info(&ofdev->dev, "Unknown serial port found, ignored\n");
ret = -ENODEV;
break;
}
Expand Down

0 comments on commit 1558f9b

Please sign in to comment.