Skip to content

Commit

Permalink
virtio: console: We support only one device at a time
Browse files Browse the repository at this point in the history
We support only one virtio_console device at a time. If multiple are
found, error out if one is already initialized.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Amit Shah authored and Rusty Russell committed Feb 24, 2010
1 parent 1dff399 commit f550804
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ static int __devinit virtcons_probe(struct virtio_device *dev)
struct virtqueue *vqs[2];
int err;

if (vdev) {
dev_warn(&vdev->dev,
"Multiple virtio-console devices not supported yet\n");
return -EEXIST;
}
vdev = dev;

/* This is the scratch page we use to receive console input */
Expand Down

0 comments on commit f550804

Please sign in to comment.