diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-07-02 15:25:20 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-07-06 17:01:11 +0200 |
commit | 525d654d7a113e24e5c4efc21e6f2f8c952d21d9 (patch) | |
tree | 7a15f061600705dc9b948a72d44a00752dabf73b /include/hw/audio | |
parent | dea1fb887c37f163891fb18313403a07752948d8 (diff) |
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
Diffstat (limited to 'include/hw/audio')
-rw-r--r-- | include/hw/audio/pcspk.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/hw/audio/pcspk.h b/include/hw/audio/pcspk.h index 7e7f5f49dc..8b48560267 100644 --- a/include/hw/audio/pcspk.h +++ b/include/hw/audio/pcspk.h @@ -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 */ |