mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
audio: rework pcspk_init()
Instead of creating and returning the pc speaker accept it as argument. That allows to rework the initialization workflow in followup patches. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20200702132525.6849-16-kraxel@redhat.com
This commit is contained in:
parent
dea1fb887c
commit
525d654d7a
4 changed files with 4 additions and 8 deletions
|
@ -31,18 +31,14 @@
|
|||
|
||||
#define TYPE_PC_SPEAKER "isa-pcspk"
|
||||
|
||||
static inline ISADevice *pcspk_init(ISABus *bus, ISADevice *pit)
|
||||
static inline void pcspk_init(ISADevice *isadev, ISABus *bus, ISADevice *pit)
|
||||
{
|
||||
DeviceState *dev;
|
||||
ISADevice *isadev;
|
||||
|
||||
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);
|
||||
isa_realize_and_unref(isadev, bus, &error_fatal);
|
||||
|
||||
return isadev;
|
||||
}
|
||||
|
||||
#endif /* HW_PCSPK_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue