瀏覽代碼

serial: 8250: of: Defer probe on missing IRQ

If the IRQ controller is not yet probed do not proceed with irq=0,
try to defer the probe.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Sverdlin 7 年之前
父節點
當前提交
c58caaab3b
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/tty/serial/8250/8250_of.c

+ 4 - 0
drivers/tty/serial/8250/8250_of.c

@@ -144,6 +144,10 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
 		port->line = ret;
 
 	port->irq = irq_of_parse_and_map(np, 0);
+	if (!port->irq) {
+		ret = -EPROBE_DEFER;
+		goto err_unprepare;
+	}
 
 	info->rst = devm_reset_control_get_optional_shared(&ofdev->dev, NULL);
 	if (IS_ERR(info->rst)) {