aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-rng.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-07-30 05:12:47 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-12-09 21:46:49 +0100
commitaf7671fdc530dd597b1ddb4561f5ffc0d534c44c (patch)
tree5a3d909e975d9f4085f4792b2ec827eb2261a0cc /hw/virtio/virtio-rng.c
parenta546fb174162b0186fe6c275476cb45e5cafa68c (diff)
downloadqemu-af7671fdc530dd597b1ddb4561f5ffc0d534c44c.zip
qemu-af7671fdc530dd597b1ddb4561f5ffc0d534c44c.tar.gz
qemu-af7671fdc530dd597b1ddb4561f5ffc0d534c44c.tar.bz2
virtio-rng: QOM realize preparations
Rename qdev -> dev because that's what realize's argument is called by convention. No need to keep more "qdev" around than necessary. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-rng.c')
-rw-r--r--hw/virtio/virtio-rng.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 42ca568..9e2a66a 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -135,8 +135,8 @@ static void check_rate_limit(void *opaque)
static int virtio_rng_device_init(VirtIODevice *vdev)
{
- DeviceState *qdev = DEVICE(vdev);
- VirtIORNG *vrng = VIRTIO_RNG(vdev);
+ DeviceState *dev = DEVICE(vdev);
+ VirtIORNG *vrng = VIRTIO_RNG(dev);
Error *local_err = NULL;
if (!vrng->conf.period_ms > 0) {
@@ -148,12 +148,12 @@ static int virtio_rng_device_init(VirtIODevice *vdev)
if (vrng->conf.rng == NULL) {
vrng->conf.default_backend = RNG_RANDOM(object_new(TYPE_RNG_RANDOM));
- object_property_add_child(OBJECT(qdev),
+ object_property_add_child(OBJECT(dev),
"default-backend",
OBJECT(vrng->conf.default_backend),
NULL);
- object_property_set_link(OBJECT(qdev),
+ object_property_set_link(OBJECT(dev),
OBJECT(vrng->conf.default_backend),
"rng", NULL);
}
@@ -184,7 +184,7 @@ static int virtio_rng_device_init(VirtIODevice *vdev)
timer_mod(vrng->rate_limit_timer,
qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + vrng->conf.period_ms);
- register_savevm(qdev, "virtio-rng", -1, 1, virtio_rng_save,
+ register_savevm(dev, "virtio-rng", -1, 1, virtio_rng_save,
virtio_rng_load, vrng);
return 0;