diff options
author | Amit Shah <amit.shah@redhat.com> | 2010-01-18 08:44:59 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-02-23 22:52:33 -0500 |
commit | f550804ab92e37a08d2622522a0f11252a2158ea (patch) | |
tree | 4c4e08f1dbfac94c6368d2812bcd3f374773abec /drivers/char/virtio_console.c | |
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/virtio_console.c')
-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 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) | |||
204 | struct virtqueue *vqs[2]; | 204 | struct virtqueue *vqs[2]; |
205 | int err; | 205 | int err; |
206 | 206 | ||
207 | if (vdev) { | ||
208 | dev_warn(&vdev->dev, | ||
209 | "Multiple virtio-console devices not supported yet\n"); | ||
210 | return -EEXIST; | ||
211 | } | ||
207 | vdev = dev; | 212 | vdev = dev; |
208 | 213 | ||
209 | /* This is the scratch page we use to receive console input */ | 214 | /* This is the scratch page we use to receive console input */ |