diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-08-06 12:43:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-04 13:43:52 +0300 |
commit | 62907e90cc7e81a74f79650321005e9c102b1ce4 (patch) | |
tree | a2a97d2584c50818f2f6619f875496ed2f1072be /drivers/tty/serial/8250/8250_dw.c | |
parent | a8571fda4740c6fb6a22f9b03699b53d699a6118 (diff) | |
download | linux-62907e90cc7e81a74f79650321005e9c102b1ce4.tar.xz |
serial: 8250_dw: use pointer to uart local variable
The use of pointer will simplify enabling runtime PM for the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20190806094322.64987-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_dw.c')
-rw-r--r-- | drivers/tty/serial/8250/8250_dw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 7b559f969f61..010d0a292e73 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -492,10 +492,10 @@ static void dw8250_setup_port(struct uart_port *p) static int dw8250_probe(struct platform_device *pdev) { - struct uart_8250_port uart = {}; + struct uart_8250_port uart = {}, *up = &uart; struct resource *regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); int irq = platform_get_irq(pdev, 0); - struct uart_port *p = &uart.port; + struct uart_port *p = &up->port; struct device *dev = &pdev->dev; struct dw8250_data *data; int err; @@ -634,10 +634,10 @@ static int dw8250_probe(struct platform_device *pdev) if (p->fifosize) { data->dma.rxconf.src_maxburst = p->fifosize / 4; data->dma.txconf.dst_maxburst = p->fifosize / 4; - uart.dma = &data->dma; + up->dma = &data->dma; } - data->line = serial8250_register_8250_port(&uart); + data->line = serial8250_register_8250_port(up); if (data->line < 0) { err = data->line; goto err_reset; |