Revert "serial-uartlite: Change logic how console_port is setup"
This reverts commit d338838c09
.
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>
This commit is contained in:
parent
61ad2a021d
commit
5042ffbc95
|
@ -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
|
* If register_console() don't assign value, then console_port pointer
|
||||||
* is cleanup.
|
* is cleanup.
|
||||||
*/
|
*/
|
||||||
if (!console_port)
|
if (ulite_uart_driver.cons->index == -1)
|
||||||
console_port = port;
|
console_port = port;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -680,8 +680,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 (ulite_uart_driver.cons->index == -1)
|
||||||
!(ulite_uart_driver.cons->flags & CON_ENABLED))
|
|
||||||
console_port = NULL;
|
console_port = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -865,11 +864,6 @@ static int ulite_remove(struct platform_device *pdev)
|
||||||
|
|
||||||
clk_disable_unprepare(pdata->clk);
|
clk_disable_unprepare(pdata->clk);
|
||||||
rc = ulite_release(&pdev->dev);
|
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_disable(&pdev->dev);
|
||||||
pm_runtime_set_suspended(&pdev->dev);
|
pm_runtime_set_suspended(&pdev->dev);
|
||||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||||
|
|
Loading…
Reference in New Issue