[PATCH 1/8] video: fbconsole: do not enter when we are already in fbconsole
Sascha Hauer
s.hauer at pengutronix.de
Fri Aug 7 06:45:34 PDT 2015
Make it possible to issue console messages from inside the fbconsole
code without entering the fbconsole again.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/video/fbconsole.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
index b368079..b798307 100644
--- a/drivers/video/fbconsole.c
+++ b/drivers/video/fbconsole.c
@@ -40,6 +40,7 @@ struct fbc_priv {
u8 csi[256];
int active;
+ int in_console;
};
static int fbc_getc(struct console_device *cdev)
@@ -282,6 +283,10 @@ static void fbc_putc(struct console_device *cdev, char c)
struct fbc_priv *priv = container_of(cdev,
struct fbc_priv, cdev);
+ if (priv->in_console)
+ return;
+ priv->in_console = 1;
+
switch (priv->state) {
case LIT:
switch (c) {
@@ -329,6 +334,7 @@ static void fbc_putc(struct console_device *cdev, char c)
}
break;
}
+ priv->in_console = 0;
}
static int setup_font(struct fbc_priv *priv)
--
2.4.6
More information about the barebox
mailing list