Skip to content

Commit

Permalink
serial: imx: fix bogus dev_err
Browse files Browse the repository at this point in the history
Only one of the two is really required, not both:
* have_rtscts or
* have_rtsgpio

In imx_rs485_config() this is done correctly, so RS485 is working,
just the error message is false.

Signed-off-by: Phil Eichinger <phil@zankapfel.net>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Fixes: b8f3bff ("serial: imx: Support common rs485 binding for RTS polarity"
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
phil eichinger authored and Greg Kroah-Hartman committed Feb 28, 2018
1 parent 7842055 commit 5d7f77e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,7 @@ static int serial_imx_probe(struct platform_device *pdev)
uart_get_rs485_mode(&pdev->dev, &sport->port.rs485);

if (sport->port.rs485.flags & SER_RS485_ENABLED &&
(!sport->have_rtscts || !sport->have_rtsgpio))
(!sport->have_rtscts && !sport->have_rtsgpio))
dev_err(&pdev->dev, "no RTS control, disabling rs485\n");

imx_rs485_config(&sport->port, &sport->port.rs485);
Expand Down

0 comments on commit 5d7f77e

Please sign in to comment.