diff options
author | Andreas Färber <afaerber@suse.de> | 2013-06-07 13:49:13 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-06-07 14:55:33 +0200 |
commit | 4a17cc4f285d7ffe41847bf728cd88c736237416 (patch) | |
tree | 8660ca33cdb5f9852502a9287587ff27b5a529bc /hw/block/fdc.c | |
parent | 2ae0e48d5fd2cb7c5bc5c392edf2dc33ac2959d0 (diff) |
isa: QOM'ify ISADevice
Rename its parent field and use DEVICE() where necessary.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/block/fdc.c')
-rw-r--r-- | hw/block/fdc.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 79ea625485..930f191d9e 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -2022,22 +2022,24 @@ static int fdctrl_connect_drives(FDCtrl *fdctrl) ISADevice *fdctrl_init_isa(ISABus *bus, DriveInfo **fds) { - ISADevice *dev; + DeviceState *dev; + ISADevice *isadev; - dev = isa_try_create(bus, TYPE_ISA_FDC); - if (!dev) { + isadev = isa_try_create(bus, TYPE_ISA_FDC); + if (!isadev) { return NULL; } + dev = DEVICE(isadev); if (fds[0]) { - qdev_prop_set_drive_nofail(&dev->qdev, "driveA", fds[0]->bdrv); + qdev_prop_set_drive_nofail(dev, "driveA", fds[0]->bdrv); } if (fds[1]) { - qdev_prop_set_drive_nofail(&dev->qdev, "driveB", fds[1]->bdrv); + qdev_prop_set_drive_nofail(dev, "driveB", fds[1]->bdrv); } - qdev_init_nofail(&dev->qdev); + qdev_init_nofail(dev); - return dev; + return isadev; } void fdctrl_init_sysbus(qemu_irq irq, int dma_chann, |