aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/isa.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-06-24 19:59:29 +0200
committerKevin Wolf <kwolf@redhat.com>2010-07-02 13:18:02 +0200
commit57c888664b5eb7edbbce4be98cb1406aa0d85c2b (patch)
tree5e91ed5fded1e54c74c24ba14f2ab96e2fec4d2e /hw/ide/isa.c
parent7d0d69509a966a5328e4fed7d0a942112d431c35 (diff)
ide: Make PIIX and ISA IDE init functions return the qdev
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/isa.c')
-rw-r--r--hw/ide/isa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index b6c6347289..10777caec1 100644
--- a/hw/ide/isa.c
+++ b/hw/ide/isa.c
@@ -75,8 +75,8 @@ static int isa_ide_initfn(ISADevice *dev)
return 0;
};
-int isa_ide_init(int iobase, int iobase2, int isairq,
- DriveInfo *hd0, DriveInfo *hd1)
+ISADevice *isa_ide_init(int iobase, int iobase2, int isairq,
+ DriveInfo *hd0, DriveInfo *hd1)
{
ISADevice *dev;
ISAIDEState *s;
@@ -86,14 +86,14 @@ int isa_ide_init(int iobase, int iobase2, int isairq,
qdev_prop_set_uint32(&dev->qdev, "iobase2", iobase2);
qdev_prop_set_uint32(&dev->qdev, "irq", isairq);
if (qdev_init(&dev->qdev) < 0)
- return -1;
+ return NULL;
s = DO_UPCAST(ISAIDEState, dev, dev);
if (hd0)
ide_create_drive(&s->bus, 0, hd0);
if (hd1)
ide_create_drive(&s->bus, 1, hd1);
- return 0;
+ return dev;
}
static ISADeviceInfo isa_ide_info = {