Commit 0946efc2 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211005134529.23256-1-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ebabb77a
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -393,8 +393,9 @@ static bool dw8250_idma_filter(struct dma_chan *chan, void *param)


static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
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;
		int id;


		/* get index of serial line, if found in DT aliases */
		/* get index of serial line, if found in DT aliases */
@@ -411,11 +412,13 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
			data->skip_autocfg = true;
			data->skip_autocfg = true;
		}
		}
#endif
#endif
		if (of_device_is_big_endian(p->dev->of_node)) {

		if (of_device_is_big_endian(np)) {
			p->iotype = UPIO_MEM32BE;
			p->iotype = UPIO_MEM32BE;
			p->serial_in = dw8250_serial_in32be;
			p->serial_in = dw8250_serial_in32be;
			p->serial_out = dw8250_serial_out32be;
			p->serial_out = dw8250_serial_out32be;
		}
		}

		if (of_device_is_compatible(np, "marvell,armada-38x-uart"))
		if (of_device_is_compatible(np, "marvell,armada-38x-uart"))
			p->serial_out = dw8250_serial_out38x;
			p->serial_out = dw8250_serial_out38x;