aboutsummaryrefslogtreecommitdiff
path: root/hw/isa-bus.c
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2011-12-15 22:09:59 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-20 15:44:30 -0600
commit75782268d682828e1ebbaa1cfaf63ecde50dad54 (patch)
tree320da6bfdc244eec04c9ea88898a52f0b3eaada6 /hw/isa-bus.c
parent142e9787485d5c58341534b78366ae7ea8e74969 (diff)
isa: always use provided ISA bus when creating an isa device
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/isa-bus.c')
-rw-r--r--hw/isa-bus.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 7c94f0b7ba..320768036c 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -130,12 +130,11 @@ ISADevice *isa_create(ISABus *bus, const char *name)
{
DeviceState *dev;
- assert(!bus || bus == isabus);
- if (!isabus) {
+ if (!bus) {
hw_error("Tried to create isa device %s with no isa bus present.",
name);
}
- dev = qdev_create(&isabus->qbus, name);
+ dev = qdev_create(&bus->qbus, name);
return DO_UPCAST(ISADevice, qdev, dev);
}
@@ -143,12 +142,11 @@ ISADevice *isa_try_create(ISABus *bus, const char *name)
{
DeviceState *dev;
- assert(!bus || bus == isabus);
- if (!isabus) {
+ if (!bus) {
hw_error("Tried to create isa device %s with no isa bus present.",
name);
}
- dev = qdev_try_create(&isabus->qbus, name);
+ dev = qdev_try_create(&bus->qbus, name);
return DO_UPCAST(ISADevice, qdev, dev);
}