[PATCH] of_serial: ignore unknown serial port
Ishizaki Kou
kou.ishizaki at toshiba.co.jp
Thu May 31 19:30:33 EST 2007
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 patch corrects probe routine to ignore unknown serial port.
Signed-off-by: Kou Ishizaki <kou.ishizaki at toshiba.co.jp>
Cc: Arnd Bergmann <arnd at arndb.de>
---
Index: linux-powerpc-git/drivers/serial/of_serial.c
===================================================================
--- linux-powerpc-git.orig/drivers/serial/of_serial.c
+++ linux-powerpc-git/drivers/serial/of_serial.c
@@ -75,15 +75,13 @@ static int __devinit of_platform_serial_
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;
}
More information about the Linuxppc-dev
mailing list