提交 1558f9b4 编写于 作者: I Ishizaki Kou 提交者: Paul Mackerras

[POWERPC] of_serial: Ignore unknown serial port

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: NKou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 f716a425
...@@ -75,15 +75,13 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev, ...@@ -75,15 +75,13 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev,
goto out; goto out;
switch (port_type) { 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: case PORT_8250 ... PORT_MAX_8250:
ret = serial8250_register_port(&port); ret = serial8250_register_port(&port);
break; break;
default: default:
/* need to add code for these */ /* need to add code for these */
case PORT_UNKNOWN:
dev_info(&ofdev->dev, "Unknown serial port found, ignored\n");
ret = -ENODEV; ret = -ENODEV;
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册