Skip to content

Commit 2336172

Browse files
committed
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 <[email protected]> Message-id: [email protected]
1 parent 59e7583 commit 2336172

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

hw/audio/pcspk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static const VMStateDescription vmstate_spk = {
219219

220220
static Property pcspk_properties[] = {
221221
DEFINE_AUDIO_PROPERTIES(PCSpkState, card),
222-
DEFINE_PROP_UINT32("iobase", PCSpkState, iobase, -1),
222+
DEFINE_PROP_UINT32("iobase", PCSpkState, iobase, 0x61),
223223
DEFINE_PROP_BOOL("migrate", PCSpkState, migrate, true),
224224
DEFINE_PROP_END_OF_LIST(),
225225
};

include/hw/audio/pcspk.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@
3333

3434
static inline void pcspk_init(ISADevice *isadev, ISABus *bus, ISADevice *pit)
3535
{
36-
DeviceState *dev;
37-
38-
dev = DEVICE(isadev);
39-
qdev_prop_set_uint32(dev, "iobase", 0x61);
40-
object_property_set_link(OBJECT(dev), OBJECT(pit), "pit", NULL);
36+
object_property_set_link(OBJECT(isadev), OBJECT(pit), "pit", NULL);
4137
isa_realize_and_unref(isadev, bus, &error_fatal);
4238
}
4339

0 commit comments

Comments
 (0)