[PATCH 1/8] video: fbconsole: do not enter when we are already in fbconsole

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make it possible to issue console messages from inside the fbconsole
code without entering the fbconsole again.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux