From: Amit Shah Date: Mon, 18 Jan 2010 13:44:59 +0000 (+0530) Subject: virtio: console: We support only one device at a time X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f550804ab92e37a08d2622522a0f11252a2158ea;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Rusty Russell --- 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 */