Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f550804a authored by Amit Shah's avatar Amit Shah Committed by Rusty Russell
Browse files

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: default avatarAmit Shah <amit.shah@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 1dff3996
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -204,6 +204,11 @@ static int __devinit virtcons_probe(struct virtio_device *dev)
	struct virtqueue *vqs[2];
	struct virtqueue *vqs[2];
	int err;
	int err;


	if (vdev) {
		dev_warn(&vdev->dev,
			 "Multiple virtio-console devices not supported yet\n");
		return -EEXIST;
	}
	vdev = dev;
	vdev = dev;


	/* This is the scratch page we use to receive console input */
	/* This is the scratch page we use to receive console input */