mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 19:03:38 +08:00
audio: set default value for pcspk.iobase property
Allows dropping the explicit qdev_prop_set_uint32 call in pcspk_init. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20200702132525.6849-21-kraxel@redhat.com
This commit is contained in:
parent
59e7583905
commit
2336172d9b
@ -219,7 +219,7 @@ static const VMStateDescription vmstate_spk = {
|
||||
|
||||
static Property pcspk_properties[] = {
|
||||
DEFINE_AUDIO_PROPERTIES(PCSpkState, card),
|
||||
DEFINE_PROP_UINT32("iobase", PCSpkState, iobase, -1),
|
||||
DEFINE_PROP_UINT32("iobase", PCSpkState, iobase, 0x61),
|
||||
DEFINE_PROP_BOOL("migrate", PCSpkState, migrate, true),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
@ -33,11 +33,7 @@
|
||||
|
||||
static inline void pcspk_init(ISADevice *isadev, ISABus *bus, ISADevice *pit)
|
||||
{
|
||||
DeviceState *dev;
|
||||
|
||||
dev = DEVICE(isadev);
|
||||
qdev_prop_set_uint32(dev, "iobase", 0x61);
|
||||
object_property_set_link(OBJECT(dev), OBJECT(pit), "pit", NULL);
|
||||
object_property_set_link(OBJECT(isadev), OBJECT(pit), "pit", NULL);
|
||||
isa_realize_and_unref(isadev, bus, &error_fatal);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user