aboutsummaryrefslogtreecommitdiff
path: root/hw/isa/i82378.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/isa/i82378.c')
-rw-r--r--hw/isa/i82378.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
index 63e0857..79ffbb5 100644
--- a/hw/isa/i82378.c
+++ b/hw/isa/i82378.c
@@ -67,6 +67,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
uint8_t *pci_conf;
ISABus *isabus;
ISADevice *pit;
+ ISADevice *pcspk;
pci_conf = pci->config;
pci_set_word(pci_conf + PCI_COMMAND,
@@ -102,7 +103,9 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
pit = i8254_pit_init(isabus, 0x40, 0, NULL);
/* speaker */
- pcspk_init(isa_new(TYPE_PC_SPEAKER), isabus, pit);
+ pcspk = isa_new(TYPE_PC_SPEAKER);
+ object_property_set_link(OBJECT(pcspk), "pit", OBJECT(pit), &error_fatal);
+ isa_realize_and_unref(pcspk, isabus, &error_fatal);
/* 2 82C37 (dma) */
isa_create_simple(isabus, "i82374");