aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorFrançois Diakhaté <fdiakh@gmail.com>2010-03-23 18:23:15 +0530
committerRusty Russell <rusty@rustcorp.com.au>2010-04-08 09:46:15 +0930
commit162a689a13ed61c0752726edb75427b2cd4186c1 (patch)
tree981e061b36efce8383e8f4334f48aba44c214fc4 /drivers/char
parent9a82446bd269b130a9ac270e720e65c3843d4d0c (diff)
downloadkernel_samsung_aries-162a689a13ed61c0752726edb75427b2cd4186c1.zip
kernel_samsung_aries-162a689a13ed61c0752726edb75427b2cd4186c1.tar.gz
kernel_samsung_aries-162a689a13ed61c0752726edb75427b2cd4186c1.tar.bz2
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>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/virtio_console.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 026ea6c..48306bc 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);
}