Commit a00d9db8 authored by Shubhrajyoti Datta's avatar Shubhrajyoti Datta Committed by Greg Kroah-Hartman

serial-uartlite: Use allocated structure instead of static ones

Remove the use of the static uartlite structure.
Signed-off-by: default avatarShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/1573555271-2579-2-git-send-email-shubhrajyoti.datta@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d338838c
...@@ -670,7 +670,7 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq, ...@@ -670,7 +670,7 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
#endif #endif
/* Register the port */ /* Register the port */
rc = uart_add_one_port(&ulite_uart_driver, port); rc = uart_add_one_port(pdata->ulite_uart_driver, port);
if (rc) { if (rc) {
dev_err(dev, "uart_add_one_port() failed; err=%i\n", rc); dev_err(dev, "uart_add_one_port() failed; err=%i\n", rc);
port->mapbase = 0; port->mapbase = 0;
...@@ -681,7 +681,7 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq, ...@@ -681,7 +681,7 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
#ifdef CONFIG_SERIAL_UARTLITE_CONSOLE #ifdef CONFIG_SERIAL_UARTLITE_CONSOLE
/* This is not port which is used for console that's why clean it up */ /* This is not port which is used for console that's why clean it up */
if (console_port == port && if (console_port == port &&
!(ulite_uart_driver.cons->flags & CON_ENABLED)) !(pdata->ulite_uart_driver->cons->flags & CON_ENABLED))
console_port = NULL; console_port = NULL;
#endif #endif
......
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