All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] virtio: console: Fix early_put_chars usage
@ 2010-03-30  5:19 Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2010-03-30  5:19 UTC (permalink / raw)
  To: virtualization; +Cc: Amit Shah, Christian Borntraeger, Michael S. Tsirkin

From: Francois Diakhate <fdiakh@gmail.com>

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.

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 drivers/char/virtio_console.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 18b1b06..f33ceaa 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -650,13 +650,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);
 }

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-30  5:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-30  5:19 [PATCH 2/4] virtio: console: Fix early_put_chars usage Rusty Russell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.