From: Michael Grzeschik Date: Thu, 13 Feb 2014 09:52:03 +0000 (+0100) Subject: serial: omap: fix rs485 probe on defered pinctrl X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=a64c1a1c755674399da3689499b3f64c2a538120;p=deliverable%2Flinux.git serial: omap: fix rs485 probe on defered pinctrl If the gpio is not yet available we better also defer the probing in the rs485 case. Signed-off-by: Michael Grzeschik Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 205158173090..77f035158d6c 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1601,8 +1601,11 @@ static int serial_omap_probe_rs485(struct uart_omap_port *up, flags & SER_RS485_RTS_AFTER_SEND); if (ret < 0) return ret; - } else + } else if (up->rts_gpio == -EPROBE_DEFER) { + return -EPROBE_DEFER; + } else { up->rts_gpio = -EINVAL; + } if (of_property_read_u32_array(np, "rs485-rts-delay", rs485_delay, 2) == 0) {