From 0bca1f531312037ab988b883ea3df85ddd2cc5b1 Mon Sep 17 00:00:00 2001 From: KONRAD Frederic Date: Wed, 24 Apr 2013 10:07:57 +0200 Subject: virtio-rng-s390: switch to the new API. Here the virtio-rng-s390 is modified for the new API. The device virtio-rng-s390 extends virtio-s390-device as before. It creates and connects a virtio-rng during the init. The properties are not modified. Signed-off-by: KONRAD Frederic Tested-by: Cornelia Huck Acked-by: Amit Shah Message-id: 1366790881-3026-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori --- hw/s390x/s390-virtio-bus.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'hw/s390x/s390-virtio-bus.h') diff --git a/hw/s390x/s390-virtio-bus.h b/hw/s390x/s390-virtio-bus.h index d7c47db2b9..991f9e2527 100644 --- a/hw/s390x/s390-virtio-bus.h +++ b/hw/s390x/s390-virtio-bus.h @@ -93,7 +93,6 @@ struct VirtIOS390Device { uint8_t feat_len; VirtIODevice *vdev; uint32_t host_features; - VirtIORNGConf rng; VirtioBusState bus; }; @@ -176,4 +175,15 @@ typedef struct VHostSCSIS390 { } VHostSCSIS390; #endif +/* virtio-rng-s390 */ + +#define TYPE_VIRTIO_RNG_S390 "virtio-rng-s390" +#define VIRTIO_RNG_S390(obj) \ + OBJECT_CHECK(VirtIORNGS390, (obj), TYPE_VIRTIO_RNG_S390) + +typedef struct VirtIORNGS390 { + VirtIOS390Device parent_obj; + VirtIORNG vdev; +} VirtIORNGS390; + #endif -- cgit v1.2.1