aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/virtio-rng.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-06-13 00:16:36 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 08:46:36 -0400
commitd2a7ddda9ffb1c8961abff6714b0f1eb925c120f (patch)
tree1090884fd260d042255255467367e4e6b6193e5d /drivers/char/hw_random/virtio-rng.c
parent9499f5e7ed5224c40706f0cec6542a9916bc7606 (diff)
virtio: find_vqs/del_vqs virtio operations
This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, and updates all drivers. This is needed for MSI support, because MSI needs to know the total number of vectors upfront. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (+ lguest/9p compile fixes)
Diffstat (limited to 'drivers/char/hw_random/virtio-rng.c')
-rw-r--r--drivers/char/hw_random/virtio-rng.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index 2aeafcea95fe..f2041fede822 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -94,13 +94,13 @@ static int virtrng_probe(struct virtio_device *vdev)
94 int err; 94 int err;
95 95
96 /* We expect a single virtqueue. */ 96 /* We expect a single virtqueue. */
97 vq = vdev->config->find_vq(vdev, 0, random_recv_done, "input"); 97 vq = virtio_find_single_vq(vdev, random_recv_done, "input");
98 if (IS_ERR(vq)) 98 if (IS_ERR(vq))
99 return PTR_ERR(vq); 99 return PTR_ERR(vq);
100 100
101 err = hwrng_register(&virtio_hwrng); 101 err = hwrng_register(&virtio_hwrng);
102 if (err) { 102 if (err) {
103 vdev->config->del_vq(vq); 103 vdev->config->del_vqs(vdev);
104 return err; 104 return err;
105 } 105 }
106 106
@@ -112,7 +112,7 @@ static void virtrng_remove(struct virtio_device *vdev)
112{ 112{
113 vdev->config->reset(vdev); 113 vdev->config->reset(vdev);
114 hwrng_unregister(&virtio_hwrng); 114 hwrng_unregister(&virtio_hwrng);
115 vdev->config->del_vq(vq); 115 vdev->config->del_vqs(vdev);
116} 116}
117 117
118static struct virtio_device_id id_table[] = { 118static struct virtio_device_id id_table[] = {