mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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:
parent
6c9dcd8760
commit
40f8214fcd
4 changed files with 11 additions and 13 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue