From 209c553355a3ac04e68a9e9560cea90897588304 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Fran=C3=A7ois=20Diakhat=C3=A9?= <fdiakh@gmail.com>
Date: Thu, 18 Mar 2010 14:48:20 +0100
Subject: [PATCH] virtio: console: Fix early_put_chars usage
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Currently early_put_chars is not used by virtio_console because it can only be used once a port has been found, at which point it's too late because it is no longer needed. This patch should fix it.
Signed-off-by: François Diakhaté <fdiakh@gmail.com>
---
drivers/char/virtio_console.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
@@ -645,13 +645,13 @@ static int put_chars(u32 vtermno, const char *buf, int count)
{
struct port *port;
+ if (unlikely(early_put_chars))
+ return early_put_chars(vtermno, buf, count);
+
port = find_port_by_vtermno(vtermno);
if (!port)
return 0;
- if (unlikely(early_put_chars))
- return early_put_chars(vtermno, buf, count);
-
return send_buf(port, (void *)buf, count);
}
--
1.6.3.3