]> git.proxmox.com Git - mirror_qemu.git/commitdiff
audio: deprecate -soundhw ac97
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 2 Jul 2020 13:25:09 +0000 (15:25 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 6 Jul 2020 15:01:11 +0000 (17:01 +0200)
Switch to deprecated_register_soundhw().  Remove the now obsolete init
function.  Add an alias so both ac97 and AC97 are working with -device.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20200702132525.6849-5-kraxel@redhat.com

hw/audio/ac97.c
qdev-monitor.c

index 8a9b9924c49593078b509d8f8694fac0f6cffbb0..38522cf0ba442d5f7ad2c630a593278ce098ccbe 100644 (file)
@@ -1393,12 +1393,6 @@ static void ac97_exit(PCIDevice *dev)
     AUD_remove_card(&s->card);
 }
 
-static int ac97_init (PCIBus *bus)
-{
-    pci_create_simple(bus, -1, TYPE_AC97);
-    return 0;
-}
-
 static Property ac97_properties[] = {
     DEFINE_AUDIO_PROPERTIES(AC97LinkState, card),
     DEFINE_PROP_END_OF_LIST (),
@@ -1436,7 +1430,8 @@ static const TypeInfo ac97_info = {
 static void ac97_register_types (void)
 {
     type_register_static (&ac97_info);
-    pci_register_soundhw("ac97", "Intel 82801AA AC97 Audio", ac97_init);
+    deprecated_register_soundhw("ac97", "Intel 82801AA AC97 Audio",
+                                0, TYPE_AC97);
 }
 
 type_init (ac97_register_types)
index 22da107484c5f5b9785e685c1a88d8df05476fd1..105d9792ecdfdec5075679f0060a393201c835f9 100644 (file)
@@ -53,6 +53,7 @@ typedef struct QDevAlias
 
 /* Please keep this table sorted by typename. */
 static const QDevAlias qdev_alias_table[] = {
+    { "AC97", "ac97" }, /* -soundhw name */
     { "e1000", "e1000-82540em" },
     { "ich9-ahci", "ahci" },
     { "lsi53c895a", "lsi" },