hw/audio/pcspk: Inline pcspk_init()

pcspk_init() is a legacy init function, inline and remove it.

Since the device is realized using &error_fatal, use the same
error for setting the "pit" link.

Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20231019073307.99608-1-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2023-10-16 12:12:39 +02:00
parent 6c9dcd8760
commit 40f8214fcd
4 changed files with 11 additions and 13 deletions

View file

@ -25,16 +25,6 @@
#ifndef HW_PCSPK_H
#define HW_PCSPK_H
#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
#include "qapi/error.h"
#define TYPE_PC_SPEAKER "isa-pcspk"
static inline void pcspk_init(ISADevice *isadev, ISABus *bus, ISADevice *pit)
{
object_property_set_link(OBJECT(isadev), "pit", OBJECT(pit), NULL);
isa_realize_and_unref(isadev, bus, &error_fatal);
}
#endif /* HW_PCSPK_H */