diff options
author | Amit Shah <amit.shah@redhat.com> | 2010-01-18 19:14:59 +0530 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-02-24 14:22:33 +1030 |
commit | f550804ab92e37a08d2622522a0f11252a2158ea (patch) | |
tree | 4c4e08f1dbfac94c6368d2812bcd3f374773abec /drivers/char | |
parent | 1dff399616a79b8ef5d61ad68f2ef1e1f590b465 (diff) |
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')
-rw-r--r-- | drivers/char/virtio_console.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 791be4e91d1..bfc0abf825e 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 */ |