diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-09-16 22:25:30 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-05 09:32:47 -0500 |
commit | 1f850f1064cfd30037fd76f688150a437164aaf2 (patch) | |
tree | d15452cb28b1604c2f4f9437be32e740ce8d14c2 /hw/ide/isa.c | |
parent | b2317837f0dadd845b33d528a940adb658b669b9 (diff) | |
download | qemu-1f850f1064cfd30037fd76f688150a437164aaf2.zip qemu-1f850f1064cfd30037fd76f688150a437164aaf2.tar.gz qemu-1f850f1064cfd30037fd76f688150a437164aaf2.tar.bz2 |
switch ide bus to inplace allocation.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ide/isa.c')
-rw-r--r-- | hw/ide/isa.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/hw/ide/isa.c b/hw/ide/isa.c index d2fe0c0..3205f40 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -37,7 +37,7 @@ typedef struct ISAIDEState { ISADevice dev; - IDEBus *bus; + IDEBus bus; uint32_t iobase; uint32_t iobase2; uint32_t isairq; @@ -48,18 +48,18 @@ static void isa_ide_save(QEMUFile* f, void *opaque) { ISAIDEState *s = opaque; - idebus_save(f, s->bus); - ide_save(f, &s->bus->ifs[0]); - ide_save(f, &s->bus->ifs[1]); + idebus_save(f, &s->bus); + ide_save(f, &s->bus.ifs[0]); + ide_save(f, &s->bus.ifs[1]); } static int isa_ide_load(QEMUFile* f, void *opaque, int version_id) { ISAIDEState *s = opaque; - idebus_load(f, s->bus, version_id); - ide_load(f, &s->bus->ifs[0], version_id); - ide_load(f, &s->bus->ifs[1], version_id); + idebus_load(f, &s->bus, version_id); + ide_load(f, &s->bus.ifs[0], version_id); + ide_load(f, &s->bus.ifs[1], version_id); return 0; } @@ -67,10 +67,10 @@ static int isa_ide_initfn(ISADevice *dev) { ISAIDEState *s = DO_UPCAST(ISAIDEState, dev, dev); - s->bus = ide_bus_new(&s->dev.qdev); - ide_init_ioport(s->bus, s->iobase, s->iobase2); + ide_bus_new(&s->bus, &s->dev.qdev); + ide_init_ioport(&s->bus, s->iobase, s->iobase2); isa_init_irq(dev, &s->irq, s->isairq); - ide_init2(s->bus, NULL, NULL, s->irq); + ide_init2(&s->bus, NULL, NULL, s->irq); register_savevm("isa-ide", 0, 3, isa_ide_save, isa_ide_load, s); return 0; }; @@ -90,9 +90,9 @@ int isa_ide_init(int iobase, int iobase2, int isairq, s = DO_UPCAST(ISAIDEState, dev, dev); if (hd0) - ide_create_drive(s->bus, 0, hd0); + ide_create_drive(&s->bus, 0, hd0); if (hd1) - ide_create_drive(s->bus, 1, hd1); + ide_create_drive(&s->bus, 1, hd1); return 0; } |