serial: 8250_dw: Re-use temporary variable for of_node
Subsystems (3)
Andy Shevchenko
reviewerPATCH 1/2 serial: 8250_dw: Re-use temporary variable for of_node
In couple of places we may re-use temporary variable instead of dereferencing it. No functional changes intended.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/tty/serial/8250/8250_dw.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/tty/serial/8250/8250_dw.c +6 -3
@@ -389,8 +389,9 @@ static bool dw8250_idma_filter(struct dma_chan *chan, void *param)static void dw8250_quirks (struct uart_port *p,struct dw8250_data *data) { -if (p->dev->of_node) { -struct device_node *np = p->dev->of_node; +struct device_node *np = p->dev->of_node; + +if (np) {int id;/* get index of serial line, if found in DT aliases */
@@ -407,11 +408,13 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data) data->skip_autocfg = true; }#endif -if (of_device_is_big_endian (p->dev->of_node)) { + +if (of_device_is_big_endian (np)) { p->iotype =UPIO_MEM32BE ; p->serial_in = dw8250_serial_in32be; p->serial_out = dw8250_serial_out32be; } +if (of_device_is_compatible (np,"marvell,armada-38x-uart" )) p->serial_out = dw8250_serial_out38x;
Signature · 1 line
2.33.0
Andy Shevchenko
reviewerPATCH 2/2 serial: 8250_dw: Fix the trivial typo in the comment
Fix the trivial typo in the comment: Premilinary --> Preliminary.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/tty/serial/8250/8250_dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/8250/8250_dw.c +1 -1
@@ -338,7 +338,7 @@ static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios, rate =clk_round_rate (d->clk, newrate);if (rate >0 ) {/* -* Premilinary set the uartclk to the new clock rate so the +* Preliminary set the uartclk to the new clock rate so the * clock update event handler caused by the clk_set_rate() * calling wouldn't actually update the UART divisor since * we about to do this anyway.
Signature · 1 line
2.33.0