aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-06-13 00:16:35 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 08:46:36 -0400
commit9499f5e7ed5224c40706f0cec6542a9916bc7606 (patch)
tree3e4e1b36d3d549ea356e88e6e44359a887c6ee01 /drivers/virtio/virtio.c
parentef688e151c00e5d529703be9a04fd506df8bc54e (diff)
virtio: add names to virtqueue struct, mapping from devices to queues.
Add a linked list of all virtqueues for a virtio device: this helps for debugging and is also needed for upcoming interface change. Also, add a "name" field for clearer debug messages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio/virtio.c')
-rw-r--r--drivers/virtio/virtio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 6b6810364860..3f52c767dfe9 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -186,6 +186,8 @@ int register_virtio_device(struct virtio_device *dev)
186 /* Acknowledge that we've seen the device. */ 186 /* Acknowledge that we've seen the device. */
187 add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE); 187 add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
188 188
189 INIT_LIST_HEAD(&dev->vqs);
190
189 /* device_register() causes the bus infrastructure to look for a 191 /* device_register() causes the bus infrastructure to look for a
190 * matching driver. */ 192 * matching driver. */
191 err = device_register(&dev->dev); 193 err = device_register(&dev->dev);