[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH V8 10/15] virtio-blk-s390 : Switch to the new AP
From: |
fred . konrad |
Subject: |
[Qemu-devel] [RFC PATCH V8 10/15] virtio-blk-s390 : Switch to the new API. |
Date: |
Wed, 19 Dec 2012 10:53:36 +0100 |
From: KONRAD Frederic <address@hidden>
Here the virtio-blk-s390 is modified for the new API. The device virtio-blk-s390
extends virtio-s390-device. It creates and connects a virtio-blk during the
init.
Signed-off-by: KONRAD Frederic <address@hidden>
---
hw/s390-virtio-bus.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index 849adab..eba4f3f 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -165,14 +165,13 @@ static int s390_virtio_net_init(VirtIOS390Device *dev)
static int s390_virtio_blk_init(VirtIOS390Device *dev)
{
- VirtIODevice *vdev;
-
- vdev = virtio_blk_init((DeviceState *)dev, &dev->blk);
- if (!vdev) {
+ DeviceState *vdev;
+ vdev = qdev_create(BUS(dev->bus), "virtio-blk");
+ virtio_blk_set_conf(vdev, &(dev->blk));
+ if (qdev_init(vdev) < 0) {
return -1;
}
-
- return s390_virtio_device_init(dev, vdev);
+ return s390_virtio_device_init(dev, VIRTIO_DEVICE(vdev));
}
static int s390_virtio_serial_init(VirtIOS390Device *dev)
--
1.7.11.7
- Re: [Qemu-devel] [RFC PATCH V8 04/15] virtio-pci : Refactor virtio-pci device., (continued)
- [Qemu-devel] [RFC PATCH V8 05/15] virtio-device : Refactor virtio-device., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 08/15] virtio-blk : Add the virtio-blk device., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 06/15] virtio-s390-bus : Add virtio-s390-bus., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 09/15] virtio-blk-pci : Switch to new API., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 07/15] virtio-s390-device : create a virtio-s390-bus during init., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 10/15] virtio-blk-s390 : Switch to the new API.,
fred . konrad <=
- [Qemu-devel] [RFC PATCH V8 12/15] virtio-blk : cleanup : remove qdev field., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 14/15] virtio : Remove VirtIOBindings., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 15/15] virtio : cleanup : init and exit function., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 11/15] virtio-blk : cleanup : use QOM cast., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 13/15] virtio : Remove the function pointer., fred . konrad, 2012/12/19