summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2010-01-18 13:44:59 (GMT)
committerRusty Russell <rusty@rustcorp.com.au>2010-02-24 03:52:33 (GMT)
commitf550804ab92e37a08d2622522a0f11252a2158ea (patch)
tree4c4e08f1dbfac94c6368d2812bcd3f374773abec /drivers
parent1dff399616a79b8ef5d61ad68f2ef1e1f590b465 (diff)
downloadlinux-fsl-qoriq-f550804ab92e37a08d2622522a0f11252a2158ea.tar.xz
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')
-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 791be4e..bfc0abf 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 */