From 2db26d4ca240bc0f04898253b9469a2435665084 Mon Sep 17 00:00:00 2001 From: KONRAD Frederic Date: Wed, 24 Apr 2013 10:07:58 +0200 Subject: virtio-rng-ccw: switch to the new API. Here the virtio-rng-ccw is modified for the new API. The device virtio-rng-pci extends virtio-pci. It creates and connects a virtio-rng-device during the init. The properties are not changed. Signed-off-by: KONRAD Frederic Tested-by: Cornelia Huck Acked-by: Amit Shah Message-id: 1366790881-3026-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori --- hw/s390x/virtio-ccw.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'hw/s390x/virtio-ccw.h') diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 84055e71da..8599248fc5 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -77,7 +77,6 @@ struct VirtioCcwDevice { VirtIODevice *vdev; char *bus_id; uint32_t host_features[VIRTIO_CCW_FEATURE_SIZE]; - VirtIORNGConf rng; VirtioBusState bus; /* Guest provided values: */ hwaddr indicators; @@ -160,6 +159,17 @@ typedef struct VirtIONetCcw { VirtIONet vdev; } VirtIONetCcw; +/* virtio-rng-ccw */ + +#define TYPE_VIRTIO_RNG_CCW "virtio-rng-ccw" +#define VIRTIO_RNG_CCW(obj) \ + OBJECT_CHECK(VirtIORNGCcw, (obj), TYPE_VIRTIO_RNG_CCW) + +typedef struct VirtIORNGCcw { + VirtioCcwDevice parent_obj; + VirtIORNG vdev; +} VirtIORNGCcw; + VirtualCssBus *virtual_css_bus_init(void); void virtio_ccw_device_update_status(SubchDev *sch); VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch); -- cgit v1.2.1