[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/12] audio: deprecate -soundhw ac97
From: |
Gerd Hoffmann |
Subject: |
[PATCH 04/12] audio: deprecate -soundhw ac97 |
Date: |
Wed, 29 Apr 2020 13:02:06 +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 <address@hidden>
---
hw/audio/ac97.c | 9 ++-------
qdev-monitor.c | 1 +
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c
index 1ec87feec0cb..f32eb46f7f4d 100644
--- a/hw/audio/ac97.c
+++ b/hw/audio/ac97.c
@@ -1395,12 +1395,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 (),
@@ -1438,7 +1432,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)
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 9833b3354969..ce45bcfa03f3 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -52,6 +52,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" },
--
2.18.2
- [PATCH 00/12] audio: deprecate -soundhw, Gerd Hoffmann, 2020/04/29
- [PATCH 02/12] stubs: add pci_create_simple, Gerd Hoffmann, 2020/04/29
- [PATCH 04/12] audio: deprecate -soundhw ac97,
Gerd Hoffmann <=
- [PATCH 09/12] audio: deprecate -soundhw sb16, Gerd Hoffmann, 2020/04/29
- [PATCH 05/12] audio: deprecate -soundhw es1370, Gerd Hoffmann, 2020/04/29
- [PATCH 07/12] audio: deprecate -soundhw cs4231a, Gerd Hoffmann, 2020/04/29
- [PATCH 01/12] stubs: add isa_create_simple, Gerd Hoffmann, 2020/04/29
- [PATCH 12/12] [RFC] audio: try use onboard audiodev for pcspk, Gerd Hoffmann, 2020/04/29
- [PATCH 08/12] audio: deprecate -soundhw gus, Gerd Hoffmann, 2020/04/29
- [PATCH 10/12] audio: deprecate -soundhw hda, Gerd Hoffmann, 2020/04/29
- [PATCH 03/12] audio: add deprecated_register_soundhw, Gerd Hoffmann, 2020/04/29
- [PATCH 11/12] audio: deprecate -soundhw pcspk, Gerd Hoffmann, 2020/04/29