aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
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/i386
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/i386')
-rw-r--r--hw/i386/intel_iommu.c2
-rw-r--r--hw/i386/kvm/clock.c2
-rw-r--r--hw/i386/kvm/i8254.c2
-rw-r--r--hw/i386/kvm/ioapic.c2
-rw-r--r--hw/i386/vmmouse.c2
-rw-r--r--hw/i386/x86-iommu.c2
-rw-r--r--hw/i386/xen/xen_pvdevice.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index a523ef0e65..6258c58ac9 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3845,7 +3845,7 @@ static void vtd_class_init(ObjectClass *klass, void *data)
dc->reset = vtd_reset;
dc->vmsd = &vtd_vmstate;
- dc->props = vtd_properties;
+ device_class_set_props(dc, vtd_properties);
dc->hotpluggable = false;
x86_class->realize = vtd_realize;
x86_class->int_remap = vtd_int_remap;
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 2c59b6894b..64283358f9 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -317,7 +317,7 @@ static void kvmclock_class_init(ObjectClass *klass, void *data)
dc->realize = kvmclock_realize;
dc->vmsd = &kvmclock_vmsd;
- dc->props = kvmclock_properties;
+ device_class_set_props(dc, kvmclock_properties);
}
static const TypeInfo kvmclock_info = {
diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
index 6a911e23f9..876f5aa6fa 100644
--- a/hw/i386/kvm/i8254.c
+++ b/hw/i386/kvm/i8254.c
@@ -322,7 +322,7 @@ static void kvm_pit_class_init(ObjectClass *klass, void *data)
k->set_channel_gate = kvm_pit_set_gate;
k->get_channel_info = kvm_pit_get_channel_info;
dc->reset = kvm_pit_reset;
- dc->props = kvm_pit_properties;
+ device_class_set_props(dc, kvm_pit_properties);
}
static const TypeInfo kvm_pit_info = {
diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c
index 973e2b2af1..4ba8e47251 100644
--- a/hw/i386/kvm/ioapic.c
+++ b/hw/i386/kvm/ioapic.c
@@ -149,7 +149,7 @@ static void kvm_ioapic_class_init(ObjectClass *klass, void *data)
k->pre_save = kvm_ioapic_get;
k->post_load = kvm_ioapic_put;
dc->reset = kvm_ioapic_reset;
- dc->props = kvm_ioapic_properties;
+ device_class_set_props(dc, kvm_ioapic_properties);
}
static const TypeInfo kvm_ioapic_info = {
diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
index c0c329f817..7c2a375527 100644
--- a/hw/i386/vmmouse.c
+++ b/hw/i386/vmmouse.c
@@ -286,7 +286,7 @@ static void vmmouse_class_initfn(ObjectClass *klass, void *data)
dc->realize = vmmouse_realizefn;
dc->reset = vmmouse_reset;
dc->vmsd = &vmstate_vmmouse;
- dc->props = vmmouse_properties;
+ device_class_set_props(dc, vmmouse_properties);
}
static const TypeInfo vmmouse_info = {
diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
index 1eaf2dd1bc..4104060e68 100644
--- a/hw/i386/x86-iommu.c
+++ b/hw/i386/x86-iommu.c
@@ -153,7 +153,7 @@ static void x86_iommu_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = x86_iommu_realize;
- dc->props = x86_iommu_properties;
+ device_class_set_props(dc, x86_iommu_properties);
}
bool x86_iommu_ir_supported(X86IOMMUState *s)
diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
index 27f646da06..ee2610c7a0 100644
--- a/hw/i386/xen/xen_pvdevice.c
+++ b/hw/i386/xen/xen_pvdevice.c
@@ -131,7 +131,7 @@ static void xen_pv_class_init(ObjectClass *klass, void *data)
k->realize = xen_pv_realize;
k->class_id = PCI_CLASS_SYSTEM_OTHER;
dc->desc = "Xen PV Device";
- dc->props = xen_pv_props;
+ device_class_set_props(dc, xen_pv_props);
dc->vmsd = &vmstate_xen_pvdevice;
}