diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-20 11:38:04 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-23 15:24:29 +0200 |
commit | 789203ffe1ef4382d6a3b854ff5226c61aec7e3e (patch) | |
tree | 7f21cfcc31b5b4281b549d5a96a7211153785b33 /common/console.c | |
parent | 742bd919194e84f14efa4f8dcfb0e31b23c436c3 (diff) | |
download | barebox-789203ffe1ef4382d6a3b854ff5226c61aec7e3e.tar.gz barebox-789203ffe1ef4382d6a3b854ff5226c61aec7e3e.tar.xz |
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/console.c b/common/console.c index 0a6fc3e9bf..bf64c08b7c 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) |