From: Marc-André Lureau <[email protected]> That's no longer necessary, the code is bus-agnostic.
Signed-off-by: Marc-André Lureau <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> --- include/hw/audio/model.h | 2 +- hw/audio/ac97.c | 2 +- hw/audio/adlib.c | 2 +- hw/audio/cs4231a.c | 2 +- hw/audio/es1370.c | 2 +- hw/audio/gus.c | 2 +- hw/audio/model.c | 7 +------ hw/audio/sb16.c | 2 +- hw/audio/virtio-snd-pci.c | 2 +- 9 files changed, 9 insertions(+), 14 deletions(-) diff --git a/include/hw/audio/model.h b/include/hw/audio/model.h index 55d6ac7f6e..ebe456c22f 100644 --- a/include/hw/audio/model.h +++ b/include/hw/audio/model.h @@ -4,7 +4,7 @@ void audio_register_model_with_cb(const char *name, const char *descr, int (*init_audio_model)(const char *audiodev)); void audio_register_model(const char *name, const char *descr, - int isa, const char *typename); + const char *typename); void audio_model_init(void); void audio_print_available_models(void); diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index 2e1be5089e..3d3c667e86 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -1360,7 +1360,7 @@ static const TypeInfo ac97_info = { static void ac97_register_types(void) { type_register_static(&ac97_info); - audio_register_model("ac97", "Intel 82801AA AC97 Audio", 0, TYPE_AC97); + audio_register_model("ac97", "Intel 82801AA AC97 Audio", TYPE_AC97); } type_init(ac97_register_types) diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c index a7c2efd87c..0bc0359ae6 100644 --- a/hw/audio/adlib.c +++ b/hw/audio/adlib.c @@ -323,7 +323,7 @@ static const TypeInfo adlib_info = { static void adlib_register_types (void) { type_register_static (&adlib_info); - audio_register_model("adlib", ADLIB_DESC, 1, TYPE_ADLIB); + audio_register_model("adlib", ADLIB_DESC, TYPE_ADLIB); } type_init (adlib_register_types) diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c index 1f7e0a33c0..18db8da324 100644 --- a/hw/audio/cs4231a.c +++ b/hw/audio/cs4231a.c @@ -723,7 +723,7 @@ static const TypeInfo cs4231a_info = { static void cs4231a_register_types (void) { type_register_static (&cs4231a_info); - audio_register_model("cs4231a", "CS4231A", 1, TYPE_CS4231A); + audio_register_model("cs4231a", "CS4231A", TYPE_CS4231A); } type_init (cs4231a_register_types) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 913c9022f6..8cb47589c3 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -905,7 +905,7 @@ static const TypeInfo es1370_info = { static void es1370_register_types (void) { type_register_static (&es1370_info); - audio_register_model("es1370", "ENSONIQ AudioPCI ES1370", 0, TYPE_ES1370); + audio_register_model("es1370", "ENSONIQ AudioPCI ES1370", TYPE_ES1370); } type_init (es1370_register_types) diff --git a/hw/audio/gus.c b/hw/audio/gus.c index ac9332ea3d..16785ce226 100644 --- a/hw/audio/gus.c +++ b/hw/audio/gus.c @@ -319,7 +319,7 @@ static const TypeInfo gus_info = { static void gus_register_types (void) { type_register_static (&gus_info); - audio_register_model("gus", "Gravis Ultrasound GF1", 1, TYPE_GUS); + audio_register_model("gus", "Gravis Ultrasound GF1", TYPE_GUS); } type_init (gus_register_types) diff --git a/hw/audio/model.c b/hw/audio/model.c index 4f6a234159..924a41e0ac 100644 --- a/hw/audio/model.c +++ b/hw/audio/model.c @@ -28,14 +28,12 @@ #include "qapi/error.h" #include "qom/object.h" #include "hw/qdev-properties.h" -#include "hw/isa/isa.h" #include "hw/audio/model.h" struct audio_model { const char *name; const char *descr; const char *typename; - int isa; int (*init)(const char *audiodev); }; @@ -48,18 +46,16 @@ void audio_register_model_with_cb(const char *name, const char *descr, assert(audio_models_count < ARRAY_SIZE(audio_models) - 1); audio_models[audio_models_count].name = name; audio_models[audio_models_count].descr = descr; - audio_models[audio_models_count].isa = 0; audio_models[audio_models_count].init = init_audio_model; audio_models_count++; } void audio_register_model(const char *name, const char *descr, - int isa, const char *typename) + const char *typename) { assert(audio_models_count < ARRAY_SIZE(audio_models) - 1); audio_models[audio_models_count].name = name; audio_models[audio_models_count].descr = descr; - audio_models[audio_models_count].isa = isa; audio_models[audio_models_count].typename = typename; audio_models_count++; } @@ -120,7 +116,6 @@ void audio_model_init(void) qdev_prop_set_string(dev, "audiodev", audiodev_id); qdev_realize_and_unref(dev, bus, &error_fatal); } else { - assert(!c->isa); c->init(audiodev_id); } } diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index 0d9fa74108..cd7e813d05 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -1471,7 +1471,7 @@ static const TypeInfo sb16_info = { static void sb16_register_types (void) { type_register_static (&sb16_info); - audio_register_model("sb16", "Creative Sound Blaster 16", 1, TYPE_SB16); + audio_register_model("sb16", "Creative Sound Blaster 16", TYPE_SB16); } type_init (sb16_register_types) diff --git a/hw/audio/virtio-snd-pci.c b/hw/audio/virtio-snd-pci.c index b78eaff851..230581ed63 100644 --- a/hw/audio/virtio-snd-pci.c +++ b/hw/audio/virtio-snd-pci.c @@ -74,7 +74,7 @@ static const VirtioPCIDeviceTypeInfo virtio_snd_pci_info = { static void virtio_snd_pci_register(void) { virtio_pci_types_register(&virtio_snd_pci_info); - audio_register_model("virtio", "Virtio Sound", 0, TYPE_VIRTIO_SND_PCI); + audio_register_model("virtio", "Virtio Sound", TYPE_VIRTIO_SND_PCI); } type_init(virtio_snd_pci_register); -- 2.51.0
