aboutsummaryrefslogtreecommitdiff
path: root/include/hw/audio/pcspk.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/audio/pcspk.h')
-rw-r--r--include/hw/audio/pcspk.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/hw/audio/pcspk.h b/include/hw/audio/pcspk.h
index 632cce9f68..7e7f5f49dc 100644
--- a/include/hw/audio/pcspk.h
+++ b/include/hw/audio/pcspk.h
@@ -27,6 +27,7 @@
#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
+#include "qapi/error.h"
#define TYPE_PC_SPEAKER "isa-pcspk"
@@ -35,11 +36,11 @@ static inline ISADevice *pcspk_init(ISABus *bus, ISADevice *pit)
DeviceState *dev;
ISADevice *isadev;
- isadev = isa_create(bus, TYPE_PC_SPEAKER);
+ isadev = isa_new(TYPE_PC_SPEAKER);
dev = DEVICE(isadev);
qdev_prop_set_uint32(dev, "iobase", 0x61);
object_property_set_link(OBJECT(dev), OBJECT(pit), "pit", NULL);
- qdev_init_nofail(dev);
+ isa_realize_and_unref(isadev, bus, &error_fatal);
return isadev;
}