mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] console: When deactivating a console, flush it first
@ 2015-07-23 13:24 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2015-07-23 13:24 UTC (permalink / raw)
  To: Barebox List

Otherwise the last characters may not be sent before deactivating
a console.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/console.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/console.c b/common/console.c
index 0a6fc3e..bf64c08 100644
--- a/common/console.c
+++ b/common/console.c
@@ -73,6 +73,9 @@ int console_set_active(struct console_device *cdev, unsigned flag)
 			cdev->setbrg(cdev, cdev->baudrate);
 	}
 
+	if (!flag && cdev->f_active && cdev->flush)
+		cdev->flush(cdev);
+
 	if (cdev->set_active) {
 		ret = cdev->set_active(cdev, flag);
 		if (ret)
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-23 13:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-23 13:24 [PATCH] console: When deactivating a console, flush it first Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox