Skip to content

Commit

Permalink
virtio: console: Fix early_put_chars usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
François Diakhaté authored and Rusty Russell committed Apr 8, 2010
1 parent 9a82446 commit 162a689
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 162a689

Please sign in to comment.