提交 75782268 编写于 作者: H Hervé Poussineau 提交者: Anthony Liguori

isa: always use provided ISA bus when creating an isa device

Signed-off-by: NHervé Poussineau <hpoussin@reactos.org>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 142e9787
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册