Skip to content

Commit a00d9db

Browse files
Shubhrajyoti Dattagregkh
authored andcommitted
serial-uartlite: Use allocated structure instead of static ones
Remove the use of the static uartlite structure. Signed-off-by: Shubhrajyoti Datta <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d338838 commit a00d9db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/tty/serial/uartlite.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
670670
#endif
671671

672672
/* Register the port */
673-
rc = uart_add_one_port(&ulite_uart_driver, port);
673+
rc = uart_add_one_port(pdata->ulite_uart_driver, port);
674674
if (rc) {
675675
dev_err(dev, "uart_add_one_port() failed; err=%i\n", rc);
676676
port->mapbase = 0;
@@ -681,7 +681,7 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
681681
#ifdef CONFIG_SERIAL_UARTLITE_CONSOLE
682682
/* This is not port which is used for console that's why clean it up */
683683
if (console_port == port &&
684-
!(ulite_uart_driver.cons->flags & CON_ENABLED))
684+
!(pdata->ulite_uart_driver->cons->flags & CON_ENABLED))
685685
console_port = NULL;
686686
#endif
687687

0 commit comments

Comments
 (0)