Skip to content

Commit

Permalink
serial: 8250: of: Defer probe on missing IRQ
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Sverdlin authored and Greg Kroah-Hartman committed Jul 16, 2018
1 parent b29330d commit c58caaa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/tty/serial/8250/8250_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit c58caaa

Please sign in to comment.