Commit 62907e90 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

serial: 8250_dw: use pointer to uart local variable

The use of pointer will simplify enabling runtime PM for the driver.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20190806094322.64987-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a8571fda
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment