diff options
author | François Diakhaté <fdiakh@gmail.com> | 2010-03-23 18:23:15 +0530 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-04-08 09:46:15 +0930 |
commit | 162a689a13ed61c0752726edb75427b2cd4186c1 (patch) | |
tree | 981e061b36efce8383e8f4334f48aba44c214fc4 | |
parent | 9a82446bd269b130a9ac270e720e65c3843d4d0c (diff) |
virtio: console: Fix early_put_chars usage
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>
-rw-r--r-- | drivers/char/virtio_console.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 026ea6c27e0..48306bc733f 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -646,13 +646,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); } |