summaryrefslogtreecommitdiffstats
path: root/common/console.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-07-20 11:38:04 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-07-23 15:24:29 +0200
commit789203ffe1ef4382d6a3b854ff5226c61aec7e3e (patch)
tree7f21cfcc31b5b4281b549d5a96a7211153785b33 /common/console.c
parent742bd919194e84f14efa4f8dcfb0e31b23c436c3 (diff)
downloadbarebox-789203ffe1ef4382d6a3b854ff5226c61aec7e3e.tar.gz
console: When deactivating a console, flush it first
Otherwise the last characters may not be sent before deactivating a console. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/console.c')
-rw-r--r--common/console.c3
1 files changed, 3 insertions, 0 deletions
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)