summaryrefslogtreecommitdiffstats
path: root/drivers/char/virtio_console.c
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2010-01-18 14:44:59 +0100
committerRusty Russell <rusty@rustcorp.com.au>2010-02-24 04:52:33 +0100
commitf550804ab92e37a08d2622522a0f11252a2158ea (patch)
tree4c4e08f1dbfac94c6368d2812bcd3f374773abec /drivers/char/virtio_console.c
parenthvc_console: make the ops pointer const. (diff)
downloadlinux-f550804ab92e37a08d2622522a0f11252a2158ea.tar.xz
linux-f550804ab92e37a08d2622522a0f11252a2158ea.zip
virtio: console: We support only one device at a time
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>
Diffstat (limited to 'drivers/char/virtio_console.c')
-rw-r--r--drivers/char/virtio_console.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 791be4e91d15..bfc0abf825ed 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -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 */