diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-10-16 17:26:14 +0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-12-18 08:50:31 +0400 |
commit | 06ca287dbac9cc19d04ac2901b8c4882c03795ff (patch) | |
tree | 37574b40e4b18070fe92e88f722035159aa341fb /drivers/virtio/virtio_mmio.c | |
parent | 1ce6853aa0f8e1cc3ae811a85d50cde6ad0ef735 (diff) | |
download | linux-06ca287dbac9cc19d04ac2901b8c4882c03795ff.tar.xz |
virtio: move queue_index and num_free fields into core struct virtqueue.
They're generic concepts, so hoist them. This also avoids accessor
functions (though kept around for merge with DaveM's net tree).
This goes even further than Jason Wang's 17bb6d4088 patch
("virtio-ring: move queue_index to vring_virtqueue") which moved the
queue_index from the specific transport.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio/virtio_mmio.c')
-rw-r--r-- | drivers/virtio/virtio_mmio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 6b1b7e184939..5a0e1d32ce13 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -225,7 +225,7 @@ static void vm_notify(struct virtqueue *vq) /* We write the queue's selector into the notification register to * signal the other end */ - writel(virtqueue_get_queue_index(vq), vm_dev->base + VIRTIO_MMIO_QUEUE_NOTIFY); + writel(vq->index, vm_dev->base + VIRTIO_MMIO_QUEUE_NOTIFY); } /* Notify all virtqueues on an interrupt. */ @@ -266,7 +266,7 @@ static void vm_del_vq(struct virtqueue *vq) struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); struct virtio_mmio_vq_info *info = vq->priv; unsigned long flags, size; - unsigned int index = virtqueue_get_queue_index(vq); + unsigned int index = vq->index; spin_lock_irqsave(&vm_dev->lock, flags); list_del(&info->node); |