]> git.proxmox.com Git - mirror_qemu.git/commitdiff
audio: set default value for pcspk.iobase property
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 2 Jul 2020 13:25:25 +0000 (15:25 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 6 Jul 2020 15:01:11 +0000 (17:01 +0200)
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

hw/audio/pcspk.c
include/hw/audio/pcspk.h

index 4c7e339ac2b53b4f04d362e6cefa833eea8ad389..ea539e7605a89bf7faf75ac1c5c366112446a8ef 100644 (file)
@@ -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(),
 };
index 8b485602675f2cf49dfad0119c136938437e292a..06cba00b837647c05db01ff064ef579e56f7aa2f 100644 (file)
 
 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);
 }