aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2019-11-14 06:22:56 +0800
committerGreg Kroah-Hartman2019-11-14 06:22:56 +0800
commit5042ffbc95d92e8a282b744e312542d348cef4fe (patch)
treefefcc013ba07e767accf2b2a7e29202f9b0fc756 /drivers/tty
parent61ad2a021d1db456a61293927f2879c980e88273 (diff)
Revert "serial-uartlite: Change logic how console_port is setup"
This reverts commit d338838c09dee338dd86f479f554d18401068978. As Johan says, this driver needs a lot more work and these changes are only going in the wrong direction: https://lkml.kernel.org/r/20190523091839.GC568@localhost Reported-by: Johan Hovold <johan@kernel.org> Cc: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Cc: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/uartlite.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index c93336189924..3d245827be27 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -665,7 +665,7 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
* If register_console() don't assign value, then console_port pointer
* is cleanup.
*/
- if (!console_port)
+ if (ulite_uart_driver.cons->index == -1)
console_port = port;
#endif
@@ -680,8 +680,7 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
#ifdef CONFIG_SERIAL_UARTLITE_CONSOLE
/* This is not port which is used for console that's why clean it up */
- if (console_port == port &&
- !(ulite_uart_driver.cons->flags & CON_ENABLED))
+ if (ulite_uart_driver.cons->index == -1)
console_port = NULL;
#endif
@@ -865,11 +864,6 @@ static int ulite_remove(struct platform_device *pdev)
clk_disable_unprepare(pdata->clk);
rc = ulite_release(&pdev->dev);
-#ifdef CONFIG_SERIAL_UARTLITE_CONSOLE
- if (console_port == port)
- console_port = NULL;
-#endif
-
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);