aboutsummaryrefslogtreecommitdiff
path: root/hw/audio
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2020-01-10 19:30:32 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-01-24 20:59:15 +0100
commit4f67d30b5e74e060b8dbe10528829b47345cd6e8 (patch)
tree025b44a1cb86fe029ed4c105b2764a13c21c5bba /hw/audio
parentb77ade9bb37b2e9813a42008cb21d0c743aa50a1 (diff)
qdev: set properties with device_class_set_props()
The following patch will need to handle properties registration during class_init time. Let's use a device_class_set_props() setter. spatch --macro-file scripts/cocci-macro-file.h --sp-file ./scripts/coccinelle/qdev-set-props.cocci --keep-comments --in-place --dir . @@ typedef DeviceClass; DeviceClass *d; expression val; @@ - d->props = val + device_class_set_props(d, val) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-20-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/audio')
-rw-r--r--hw/audio/ac97.c2
-rw-r--r--hw/audio/adlib.c2
-rw-r--r--hw/audio/cs4231.c2
-rw-r--r--hw/audio/cs4231a.c2
-rw-r--r--hw/audio/es1370.c2
-rw-r--r--hw/audio/gus.c2
-rw-r--r--hw/audio/hda-codec.c2
-rw-r--r--hw/audio/intel-hda.c4
-rw-r--r--hw/audio/milkymist-ac97.c2
-rw-r--r--hw/audio/pcspk.c2
-rw-r--r--hw/audio/pl041.c2
-rw-r--r--hw/audio/sb16.c2
-rw-r--r--hw/audio/wm8750.c2
13 files changed, 14 insertions, 14 deletions
diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c
index 78cda88333..1ec87feec0 100644
--- a/hw/audio/ac97.c
+++ b/hw/audio/ac97.c
@@ -1420,7 +1420,7 @@ static void ac97_class_init (ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Intel 82801AA AC97 Audio";
dc->vmsd = &vmstate_ac97;
- dc->props = ac97_properties;
+ device_class_set_props(dc, ac97_properties);
dc->reset = ac97_on_reset;
}
diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c
index cb4178d861..d6c1fb0586 100644
--- a/hw/audio/adlib.c
+++ b/hw/audio/adlib.c
@@ -312,7 +312,7 @@ static void adlib_class_initfn (ObjectClass *klass, void *data)
dc->realize = adlib_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = ADLIB_DESC;
- dc->props = adlib_properties;
+ device_class_set_props(dc, adlib_properties);
}
static const TypeInfo adlib_info = {
diff --git a/hw/audio/cs4231.c b/hw/audio/cs4231.c
index b5d3e895ce..11a6328fc2 100644
--- a/hw/audio/cs4231.c
+++ b/hw/audio/cs4231.c
@@ -168,7 +168,7 @@ static void cs4231_class_init(ObjectClass *klass, void *data)
dc->reset = cs_reset;
dc->vmsd = &vmstate_cs4231;
- dc->props = cs4231_properties;
+ device_class_set_props(dc, cs4231_properties);
}
static const TypeInfo cs4231_info = {
diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c
index c7b8067489..ffdbb58d6a 100644
--- a/hw/audio/cs4231a.c
+++ b/hw/audio/cs4231a.c
@@ -706,7 +706,7 @@ static void cs4231a_class_initfn (ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Crystal Semiconductor CS4231A";
dc->vmsd = &vmstate_cs4231a;
- dc->props = cs4231a_properties;
+ device_class_set_props(dc, cs4231a_properties);
}
static const TypeInfo cs4231a_info = {
diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c
index f9e9f2a3b3..89c4dabcd4 100644
--- a/hw/audio/es1370.c
+++ b/hw/audio/es1370.c
@@ -908,7 +908,7 @@ static void es1370_class_init (ObjectClass *klass, void *data)
dc->desc = "ENSONIQ AudioPCI ES1370";
dc->vmsd = &vmstate_es1370;
dc->reset = es1370_on_reset;
- dc->props = es1370_properties;
+ device_class_set_props(dc, es1370_properties);
}
static const TypeInfo es1370_info = {
diff --git a/hw/audio/gus.c b/hw/audio/gus.c
index 2b6b7c4e3f..eb4a803fb5 100644
--- a/hw/audio/gus.c
+++ b/hw/audio/gus.c
@@ -315,7 +315,7 @@ static void gus_class_initfn (ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Gravis Ultrasound GF1";
dc->vmsd = &vmstate_gus;
- dc->props = gus_properties;
+ device_class_set_props(dc, gus_properties);
}
static const TypeInfo gus_info = {
diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c
index e711a99a41..cbd92b72f2 100644
--- a/hw/audio/hda-codec.c
+++ b/hw/audio/hda-codec.c
@@ -892,7 +892,7 @@ static void hda_audio_base_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->reset = hda_audio_reset;
dc->vmsd = &vmstate_hda_audio;
- dc->props = hda_audio_properties;
+ device_class_set_props(dc, hda_audio_properties);
}
static const TypeInfo hda_audio_info = {
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 6ecd383540..e96a707ac5 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -1233,7 +1233,7 @@ static void intel_hda_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_MULTIMEDIA_HD_AUDIO;
dc->reset = intel_hda_reset;
dc->vmsd = &vmstate_intel_hda;
- dc->props = intel_hda_properties;
+ device_class_set_props(dc, intel_hda_properties);
}
static void intel_hda_class_init_ich6(ObjectClass *klass, void *data)
@@ -1289,7 +1289,7 @@ static void hda_codec_device_class_init(ObjectClass *klass, void *data)
k->unrealize = hda_codec_dev_unrealize;
set_bit(DEVICE_CATEGORY_SOUND, k->categories);
k->bus_type = TYPE_HDA_BUS;
- k->props = hda_props;
+ device_class_set_props(k, hda_props);
}
static const TypeInfo hda_codec_device_type_info = {
diff --git a/hw/audio/milkymist-ac97.c b/hw/audio/milkymist-ac97.c
index 6d409eff1b..0fa38adbe2 100644
--- a/hw/audio/milkymist-ac97.c
+++ b/hw/audio/milkymist-ac97.c
@@ -342,7 +342,7 @@ static void milkymist_ac97_class_init(ObjectClass *klass, void *data)
dc->realize = milkymist_ac97_realize;
dc->reset = milkymist_ac97_reset;
dc->vmsd = &vmstate_milkymist_ac97;
- dc->props = milkymist_ac97_properties;
+ device_class_set_props(dc, milkymist_ac97_properties);
}
static const TypeInfo milkymist_ac97_info = {
diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c
index d773eb80de..29dc00bf8d 100644
--- a/hw/audio/pcspk.c
+++ b/hw/audio/pcspk.c
@@ -222,7 +222,7 @@ static void pcspk_class_initfn(ObjectClass *klass, void *data)
dc->realize = pcspk_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->vmsd = &vmstate_spk;
- dc->props = pcspk_properties;
+ device_class_set_props(dc, pcspk_properties);
/* Reason: realize sets global pcspk_state */
/* Reason: pit object link */
dc->user_creatable = false;
diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c
index c30417d46d..c3d3eab6ed 100644
--- a/hw/audio/pl041.c
+++ b/hw/audio/pl041.c
@@ -640,7 +640,7 @@ static void pl041_device_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->reset = pl041_device_reset;
dc->vmsd = &vmstate_pl041;
- dc->props = pl041_device_properties;
+ device_class_set_props(dc, pl041_device_properties);
}
static const TypeInfo pl041_device_info = {
diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c
index a354f94acb..df6f755a37 100644
--- a/hw/audio/sb16.c
+++ b/hw/audio/sb16.c
@@ -1439,7 +1439,7 @@ static void sb16_class_initfn (ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Creative Sound Blaster 16";
dc->vmsd = &vmstate_sb16;
- dc->props = sb16_properties;
+ device_class_set_props(dc, sb16_properties);
}
static const TypeInfo sb16_info = {
diff --git a/hw/audio/wm8750.c b/hw/audio/wm8750.c
index 601ed04aff..92b2902a10 100644
--- a/hw/audio/wm8750.c
+++ b/hw/audio/wm8750.c
@@ -717,7 +717,7 @@ static void wm8750_class_init(ObjectClass *klass, void *data)
sc->recv = wm8750_rx;
sc->send = wm8750_tx;
dc->vmsd = &vmstate_wm8750;
- dc->props = wm8750_properties;
+ device_class_set_props(dc, wm8750_properties);
}
static const TypeInfo wm8750_info = {