From: Anthony Liguori <anthony@codemonkey.ws>
To: "Andreas Färber" <afaerber@suse.de>
Cc: "Kevin Wolf (odd fixer:IDE)" <kwolf@redhat.com>,
"Peter Maydell (maintainer:Integrator CP)"
<peter.maydell@linaro.org>,
"Gerd Hoffmann (supporter:SPICE)" <kraxel@redhat.com>,
"Anthony Liguori (supporter:virtio)" <aliguori@us.ibm.com>,
"Igor Mitsyanko (maintainer:Exynos)" <i.mitsyanko@samsung.com>,
"Mark Langsdorf (supporter:Calxeda Highbank)"
<mark.langsdorf@calxeda.com>,
"Evgeny Voevodin (maintainer:Exynos)" <e.voevodin@samsung.com>,
"\"Michael S. Tsirkin\" (supporter:PCI)" <mst@redhat.com>,
"Paul Brook (maintainer:Integrator CP)" <paul@codesourcery.com>,
qemu-devel@nongnu.org,
"Alexander Graf (maintainer:S390 Virtio)" <agraf@suse.de>,
"Peter Crosthwaite (maintainer:Xilinx Zynq)"
<peter.crosthwaite@petalogix.com>,
"Jan Kiszka (maintainer:Musicpal)" <jan.kiszka@web.de>,
"\"Aneesh Kumar K.V\" (supporter:virtio-9p)"
<aneesh.kumar@linux.vnet.ibm.com>,
"Blue Swirl (maintainer:Sun4m)" <blauwirbel@gmail.com>,
"Amit Shah (supporter:virtio-serial)" <amit.shah@redhat.com>,
pbonzini@redhat.com,
"Maksim Kozlov (maintainer:Exynos)" <m.kozlov@samsung.com>,
"Dmitry Solodkiy (maintainer:Exynos)" <d.solodkiy@samsung.com>
Subject: Re: [Qemu-devel] [PATCH qom-next 5/7] qom: Push static properties to Object
Date: Fri, 08 Jun 2012 09:26:36 +0800 [thread overview]
Message-ID: <4FD154CC.3020202@codemonkey.ws> (raw)
In-Reply-To: <1339097465-22977-6-git-send-email-afaerber@suse.de>
On 06/08/2012 03:31 AM, Andreas Färber wrote:
> From: Paolo Bonzini<pbonzini@redhat.com>
>
> This patch is made much larger by the need to touch all assignments
> of props. The interesting changes are in hw/qdev-monitor.c,
> hw/qdev-properties.c, hw/qdev.c, hw/qdev.h, include/qemu/object.h,
> qom/object.c.
>
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> [AF: Convert arm_gic_properties as well]
> Signed-off-by: Andreas Färber<afaerber@suse.de>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Regards,
Anthony Liguori
> ---
> hw/9pfs/virtio-9p-device.c | 2 +-
> hw/a15mpcore.c | 3 +--
> hw/a9mpcore.c | 2 +-
> hw/ac97.c | 2 +-
> hw/acpi_piix4.c | 2 +-
> hw/apic_common.c | 2 +-
> hw/applesmc.c | 2 +-
> hw/arm11mpcore.c | 6 ++----
> hw/arm_gic.c | 2 +-
> hw/arm_l2x0.c | 2 +-
> hw/arm_mptimer.c | 2 +-
> hw/arm_sysctl.c | 2 +-
> hw/arm_timer.c | 3 +--
> hw/armv7m.c | 3 +--
> hw/armv7m_nvic.c | 2 +-
> hw/cadence_gem.c | 2 +-
> hw/ccid-card-emulated.c | 2 +-
> hw/ccid-card-passthru.c | 2 +-
> hw/cs4231.c | 2 +-
> hw/cs4231a.c | 2 +-
> hw/debugcon.c | 3 +--
> hw/ds1225y.c | 2 +-
> hw/e1000.c | 2 +-
> hw/eccmemctl.c | 2 +-
> hw/eepro100.c | 2 +-
> hw/escc.c | 2 +-
> hw/esp.c | 2 +-
> hw/etraxfs_eth.c | 3 +--
> hw/etraxfs_pic.c | 3 +--
> hw/exynos4210_combiner.c | 2 +-
> hw/exynos4210_gic.c | 3 +--
> hw/exynos4210_uart.c | 2 +-
> hw/fdc.c | 6 +++---
> hw/fw_cfg.c | 2 +-
> hw/g364fb.c | 2 +-
> hw/grlib_apbuart.c | 3 +--
> hw/grlib_gptimer.c | 2 +-
> hw/grlib_irqmp.c | 2 +-
> hw/gus.c | 2 +-
> hw/hda-audio.c | 6 +++---
> hw/hpet.c | 2 +-
> hw/i2c.c | 2 +-
> hw/i82374.c | 2 +-
> hw/i82378.c | 2 +-
> hw/i8254.c | 2 +-
> hw/i8259_common.c | 2 +-
> hw/ide/ahci.c | 2 +-
> hw/ide/cmd646.c | 3 +--
> hw/ide/isa.c | 2 +-
> hw/ide/qdev.c | 8 ++++----
> hw/integratorcp.c | 3 +--
> hw/intel-hda.c | 4 ++--
> hw/ioh3420.c | 2 +-
> hw/ivshmem.c | 2 +-
> hw/kvm/i8254.c | 2 +-
> hw/kvm/ioapic.c | 2 +-
> hw/lan9118.c | 2 +-
> hw/lance.c | 2 +-
> hw/lm32_sys.c | 2 +-
> hw/lm32_timer.c | 2 +-
> hw/m48t59.c | 4 ++--
> hw/marvell_88w8618_audio.c | 2 +-
> hw/mc146818rtc.c | 2 +-
> hw/milkymist-minimac2.c | 2 +-
> hw/milkymist-softusb.c | 2 +-
> hw/milkymist-sysctl.c | 2 +-
> hw/milkymist-vgafb.c | 2 +-
> hw/mipsnet.c | 2 +-
> hw/musicpal.c | 2 +-
> hw/nand.c | 2 +-
> hw/ne2000-isa.c | 3 +--
> hw/ne2000.c | 2 +-
> hw/omap_gpio.c | 4 ++--
> hw/omap_i2c.c | 2 +-
> hw/omap_intc.c | 4 ++--
> hw/onenand.c | 2 +-
> hw/opencores_eth.c | 2 +-
> hw/parallel.c | 3 +--
> hw/pc_sysfw.c | 2 +-
> hw/pci.c | 2 +-
> hw/pci_bridge_dev.c | 2 +-
> hw/pcnet-pci.c | 2 +-
> hw/pcspk.c | 2 +-
> hw/pl041.c | 2 +-
> hw/pxa2xx.c | 2 +-
> hw/pxa2xx_dma.c | 2 +-
> hw/pxa2xx_gpio.c | 2 +-
> hw/pxa2xx_timer.c | 4 ++--
> hw/qdev-monitor.c | 4 ++--
> hw/qdev-properties.c | 2 +-
> hw/qdev.c | 14 +-------------
> hw/qdev.h | 1 -
> hw/qxl.c | 4 ++--
> hw/rtl8139.c | 2 +-
> hw/s390-virtio-bus.c | 12 ++++--------
> hw/sb16.c | 2 +-
> hw/scsi-bus.c | 2 +-
> hw/scsi-disk.c | 8 ++++----
> hw/scsi-generic.c | 2 +-
> hw/serial.c | 2 +-
> hw/slavio_timer.c | 2 +-
> hw/smbus_eeprom.c | 3 +--
> hw/smc91c111.c | 2 +-
> hw/spapr_llan.c | 3 +--
> hw/spapr_pci.c | 3 +--
> hw/spapr_vio.c | 2 +-
> hw/spapr_vscsi.c | 3 +--
> hw/spapr_vty.c | 3 +--
> hw/sparc32_dma.c | 2 +-
> hw/spitz.c | 4 ++--
> hw/stellaris_enet.c | 3 +--
> hw/strongarm.c | 2 +-
> hw/sun4m.c | 6 ++----
> hw/sun4m_iommu.c | 2 +-
> hw/sun4u.c | 6 ++----
> hw/tcx.c | 2 +-
> hw/usb/bus.c | 2 +-
> hw/usb/dev-audio.c | 2 +-
> hw/usb/dev-network.c | 2 +-
> hw/usb/dev-serial.c | 4 ++--
> hw/usb/dev-smartcard-reader.c | 4 ++--
> hw/usb/dev-storage.c | 2 +-
> hw/usb/hcd-ehci.c | 4 ++--
> hw/usb/hcd-ohci.c | 4 ++--
> hw/usb/hcd-uhci.c | 12 ++++++------
> hw/usb/hcd-xhci.c | 2 +-
> hw/usb/host-linux.c | 2 +-
> hw/usb/redirect.c | 2 +-
> hw/virtio-console.c | 6 ++----
> hw/virtio-pci.c | 10 +++++-----
> hw/virtio-serial-bus.c | 2 +-
> hw/vmmouse.c | 2 +-
> hw/vt82c686.c | 2 +-
> hw/xgmac.c | 2 +-
> hw/xilinx_axidma.c | 3 +--
> hw/xilinx_axienet.c | 3 +--
> hw/xilinx_ethlite.c | 3 +--
> hw/xilinx_intc.c | 3 +--
> hw/xilinx_timer.c | 3 +--
> hw/xio3130_downstream.c | 2 +-
> hw/xio3130_upstream.c | 2 +-
> hw/zaurus.c | 2 +-
> include/qemu/object.h | 7 ++++---
> qom/object.c | 20 ++++++++++++++++++++
> 144 files changed, 203 insertions(+), 230 deletions(-)
>
> diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
> index b8220ab..83e1495 100644
> --- a/hw/9pfs/virtio-9p-device.c
> +++ b/hw/9pfs/virtio-9p-device.c
> @@ -173,7 +173,7 @@ static void virtio_9p_class_init(ObjectClass *klass, void *data)
> k->device_id = 0x1009;
> k->revision = VIRTIO_PCI_ABI_VERSION;
> k->class_id = 0x2;
> - dc->props = virtio_9p_properties;
> + klass->props = virtio_9p_properties;
> dc->reset = virtio_pci_reset;
> }
>
> diff --git a/hw/a15mpcore.c b/hw/a15mpcore.c
> index 5a7b365..a330166 100644
> --- a/hw/a15mpcore.c
> +++ b/hw/a15mpcore.c
> @@ -85,10 +85,9 @@ static Property a15mp_priv_properties[] = {
>
> static void a15mp_priv_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
> k->init = a15mp_priv_init;
> - dc->props = a15mp_priv_properties;
> + klass->props = a15mp_priv_properties;
> /* We currently have no savable state */
> }
>
> diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c
> index c2ff74d..ee35483 100644
> --- a/hw/a9mpcore.c
> +++ b/hw/a9mpcore.c
> @@ -222,7 +222,7 @@ static void a9mp_priv_class_init(ObjectClass *klass, void *data)
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = a9mp_priv_init;
> - dc->props = a9mp_priv_properties;
> + klass->props = a9mp_priv_properties;
> dc->vmsd =&vmstate_a9mp_priv;
> dc->reset = a9mp_priv_reset;
> }
> diff --git a/hw/ac97.c b/hw/ac97.c
> index e791b9d..8842b22 100644
> --- a/hw/ac97.c
> +++ b/hw/ac97.c
> @@ -1352,7 +1352,7 @@ static void ac97_class_init (ObjectClass *klass, void *data)
> k->class_id = PCI_CLASS_MULTIMEDIA_AUDIO;
> dc->desc = "Intel 82801AA AC97 Audio";
> dc->vmsd =&vmstate_ac97;
> - dc->props = ac97_properties;
> + klass->props = ac97_properties;
> }
>
> static TypeInfo ac97_info = {
> diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
> index a11c8e7..0b1acfa 100644
> --- a/hw/acpi_piix4.c
> +++ b/hw/acpi_piix4.c
> @@ -463,7 +463,7 @@ static void piix4_pm_class_init(ObjectClass *klass, void *data)
> dc->desc = "PM";
> dc->no_user = 1;
> dc->vmsd =&vmstate_acpi;
> - dc->props = piix4_pm_properties;
> + klass->props = piix4_pm_properties;
> }
>
> static TypeInfo piix4_pm_info = {
> diff --git a/hw/apic_common.c b/hw/apic_common.c
> index 60b8259..9774cf6 100644
> --- a/hw/apic_common.c
> +++ b/hw/apic_common.c
> @@ -370,7 +370,7 @@ static void apic_common_class_init(ObjectClass *klass, void *data)
> dc->vmsd =&vmstate_apic_common;
> dc->reset = apic_reset_common;
> dc->no_user = 1;
> - dc->props = apic_properties_common;
> + klass->props = apic_properties_common;
> sc->init = apic_init_common;
> }
>
> diff --git a/hw/applesmc.c b/hw/applesmc.c
> index 8bedaad..b8f1855 100644
> --- a/hw/applesmc.c
> +++ b/hw/applesmc.c
> @@ -233,7 +233,7 @@ static void qdev_applesmc_class_init(ObjectClass *klass, void *data)
> ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
> ic->init = applesmc_isa_init;
> dc->reset = qdev_applesmc_isa_reset;
> - dc->props = applesmc_isa_properties;
> + klass->props = applesmc_isa_properties;
> }
>
> static TypeInfo applesmc_isa_info = {
> diff --git a/hw/arm11mpcore.c b/hw/arm11mpcore.c
> index c528d7a..8f47c8b 100644
> --- a/hw/arm11mpcore.c
> +++ b/hw/arm11mpcore.c
> @@ -210,11 +210,10 @@ static Property mpcore_rirq_properties[] = {
>
> static void mpcore_rirq_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = realview_mpcore_init;
> - dc->props = mpcore_rirq_properties;
> + klass->props = mpcore_rirq_properties;
> }
>
> static TypeInfo mpcore_rirq_info = {
> @@ -240,11 +239,10 @@ static Property mpcore_priv_properties[] = {
>
> static void mpcore_priv_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = mpcore_priv_init;
> - dc->props = mpcore_priv_properties;
> + klass->props = mpcore_priv_properties;
> }
>
> static TypeInfo mpcore_priv_info = {
> diff --git a/hw/arm_gic.c b/hw/arm_gic.c
> index 72298b4..fbfd06e 100644
> --- a/hw/arm_gic.c
> +++ b/hw/arm_gic.c
> @@ -945,7 +945,7 @@ static void arm_gic_class_init(ObjectClass *klass, void *data)
> DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);
> sbc->init = arm_gic_init;
> - dc->props = arm_gic_properties;
> + klass->props = arm_gic_properties;
> dc->reset = gic_reset;
> dc->no_user = 1;
> }
> diff --git a/hw/arm_l2x0.c b/hw/arm_l2x0.c
> index 09f290c..1e5fed9 100644
> --- a/hw/arm_l2x0.c
> +++ b/hw/arm_l2x0.c
> @@ -173,7 +173,7 @@ static void l2x0_class_init(ObjectClass *klass, void *data)
> k->init = l2x0_priv_init;
> dc->vmsd =&vmstate_l2x0;
> dc->no_user = 1;
> - dc->props = l2x0_properties;
> + klass->props = l2x0_properties;
> dc->reset = l2x0_priv_reset;
> }
>
> diff --git a/hw/arm_mptimer.c b/hw/arm_mptimer.c
> index fe43cbb..4ffc491 100644
> --- a/hw/arm_mptimer.c
> +++ b/hw/arm_mptimer.c
> @@ -326,7 +326,7 @@ static void arm_mptimer_class_init(ObjectClass *klass, void *data)
> dc->vmsd =&vmstate_arm_mptimer;
> dc->reset = arm_mptimer_reset;
> dc->no_user = 1;
> - dc->props = arm_mptimer_properties;
> + klass->props = arm_mptimer_properties;
> }
>
> static TypeInfo arm_mptimer_info = {
> diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c
> index 5f1237b..7aa449c 100644
> --- a/hw/arm_sysctl.c
> +++ b/hw/arm_sysctl.c
> @@ -403,7 +403,7 @@ static void arm_sysctl_class_init(ObjectClass *klass, void *data)
> k->init = arm_sysctl_init;
> dc->reset = arm_sysctl_reset;
> dc->vmsd =&vmstate_arm_sysctl;
> - dc->props = arm_sysctl_properties;
> + klass->props = arm_sysctl_properties;
> }
>
> static TypeInfo arm_sysctl_info = {
> diff --git a/hw/arm_timer.c b/hw/arm_timer.c
> index e3ecce2..d14166a 100644
> --- a/hw/arm_timer.c
> +++ b/hw/arm_timer.c
> @@ -370,10 +370,9 @@ static Property sp804_properties[] = {
> static void sp804_class_init(ObjectClass *klass, void *data)
> {
> SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
> - DeviceClass *k = DEVICE_CLASS(klass);
>
> sdc->init = sp804_init;
> - k->props = sp804_properties;
> + klass->props = sp804_properties;
> }
>
> static TypeInfo sp804_info = {
> diff --git a/hw/armv7m.c b/hw/armv7m.c
> index 8cec78d..2d2bc90 100644
> --- a/hw/armv7m.c
> +++ b/hw/armv7m.c
> @@ -257,11 +257,10 @@ static Property bitband_properties[] = {
>
> static void bitband_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = bitband_init;
> - dc->props = bitband_properties;
> + klass->props = bitband_properties;
> }
>
> static TypeInfo bitband_info = {
> diff --git a/hw/armv7m_nvic.c b/hw/armv7m_nvic.c
> index 986a6bb..a375342 100644
> --- a/hw/armv7m_nvic.c
> +++ b/hw/armv7m_nvic.c
> @@ -415,7 +415,7 @@ static void armv7m_nvic_class_init(ObjectClass *klass, void *data)
> sdc->init = armv7m_nvic_init;
> dc->vmsd =&vmstate_nvic;
> dc->reset = armv7m_nvic_reset;
> - dc->props = armv7m_nvic_properties;
> + klass->props = armv7m_nvic_properties;
> }
>
> static TypeInfo armv7m_nvic_info = {
> diff --git a/hw/cadence_gem.c b/hw/cadence_gem.c
> index e2140ae..a065168 100644
> --- a/hw/cadence_gem.c
> +++ b/hw/cadence_gem.c
> @@ -1213,7 +1213,7 @@ static void gem_class_init(ObjectClass *klass, void *data)
> SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
>
> sdc->init = gem_init;
> - dc->props = gem_properties;
> + klass->props = gem_properties;
> dc->vmsd =&vmstate_cadence_gem;
> dc->reset = gem_reset;
> }
> diff --git a/hw/ccid-card-emulated.c b/hw/ccid-card-emulated.c
> index f4a6da4..db27ec5 100644
> --- a/hw/ccid-card-emulated.c
> +++ b/hw/ccid-card-emulated.c
> @@ -584,7 +584,7 @@ static void emulated_class_initfn(ObjectClass *klass, void *data)
> cc->get_atr = emulated_get_atr;
> cc->apdu_from_guest = emulated_apdu_from_guest;
> dc->desc = "emulated smartcard";
> - dc->props = emulated_card_properties;
> + klass->props = emulated_card_properties;
> }
>
> static TypeInfo emulated_card_info = {
> diff --git a/hw/ccid-card-passthru.c b/hw/ccid-card-passthru.c
> index bd6c777..856ee19 100644
> --- a/hw/ccid-card-passthru.c
> +++ b/hw/ccid-card-passthru.c
> @@ -333,7 +333,7 @@ static void passthru_class_initfn(ObjectClass *klass, void *data)
> cc->apdu_from_guest = passthru_apdu_from_guest;
> dc->desc = "passthrough smartcard";
> dc->vmsd =&passthru_vmstate;
> - dc->props = passthru_card_properties;
> + klass->props = passthru_card_properties;
> }
>
> static TypeInfo passthru_card_info = {
> diff --git a/hw/cs4231.c b/hw/cs4231.c
> index cfec1d9..06467cd 100644
> --- a/hw/cs4231.c
> +++ b/hw/cs4231.c
> @@ -163,7 +163,7 @@ static void cs4231_class_init(ObjectClass *klass, void *data)
> k->init = cs4231_init1;
> dc->reset = cs_reset;
> dc->vmsd =&vmstate_cs4231;
> - dc->props = cs4231_properties;
> + klass->props = cs4231_properties;
> }
>
> static TypeInfo cs4231_info = {
> diff --git a/hw/cs4231a.c b/hw/cs4231a.c
> index e07b9d6..7e4d03c 100644
> --- a/hw/cs4231a.c
> +++ b/hw/cs4231a.c
> @@ -679,7 +679,7 @@ static void cs4231a_class_initfn (ObjectClass *klass, void *data)
> ic->init = cs4231a_initfn;
> dc->desc = "Crystal Semiconductor CS4231A";
> dc->vmsd =&vmstate_cs4231a;
> - dc->props = cs4231a_properties;
> + klass->props = cs4231a_properties;
> }
>
> static TypeInfo cs4231a_info = {
> diff --git a/hw/debugcon.c b/hw/debugcon.c
> index 14ab326..4dffebd 100644
> --- a/hw/debugcon.c
> +++ b/hw/debugcon.c
> @@ -96,10 +96,9 @@ static Property debugcon_isa_properties[] = {
>
> static void debugcon_isa_class_initfn(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
> ic->init = debugcon_isa_initfn;
> - dc->props = debugcon_isa_properties;
> + klass->props = debugcon_isa_properties;
> }
>
> static TypeInfo debugcon_isa_info = {
> diff --git a/hw/ds1225y.c b/hw/ds1225y.c
> index 2cd355b..d3d349c 100644
> --- a/hw/ds1225y.c
> +++ b/hw/ds1225y.c
> @@ -147,7 +147,7 @@ static void nvram_sysbus_class_init(ObjectClass *klass, void *data)
>
> k->init = nvram_sysbus_initfn;
> dc->vmsd =&vmstate_nvram;
> - dc->props = nvram_sysbus_properties;
> + klass->props = nvram_sysbus_properties;
> }
>
> static TypeInfo nvram_sysbus_info = {
> diff --git a/hw/e1000.c b/hw/e1000.c
> index 4573f13..7cabd99 100644
> --- a/hw/e1000.c
> +++ b/hw/e1000.c
> @@ -1284,7 +1284,7 @@ static void e1000_class_init(ObjectClass *klass, void *data)
> dc->desc = "Intel Gigabit Ethernet";
> dc->reset = qdev_e1000_reset;
> dc->vmsd =&vmstate_e1000;
> - dc->props = e1000_properties;
> + klass->props = e1000_properties;
> }
>
> static TypeInfo e1000_info = {
> diff --git a/hw/eccmemctl.c b/hw/eccmemctl.c
> index fe1cd90..82e4a4d 100644
> --- a/hw/eccmemctl.c
> +++ b/hw/eccmemctl.c
> @@ -321,7 +321,7 @@ static void ecc_class_init(ObjectClass *klass, void *data)
> k->init = ecc_init1;
> dc->reset = ecc_reset;
> dc->vmsd =&vmstate_ecc;
> - dc->props = ecc_properties;
> + klass->props = ecc_properties;
> }
>
> static TypeInfo ecc_info = {
> diff --git a/hw/eepro100.c b/hw/eepro100.c
> index 6279ae3..ac42d85 100644
> --- a/hw/eepro100.c
> +++ b/hw/eepro100.c
> @@ -2075,7 +2075,7 @@ static void eepro100_class_init(ObjectClass *klass, void *data)
>
> info = eepro100_get_class_by_name(object_class_get_name(klass));
>
> - dc->props = e100_properties;
> + klass->props = e100_properties;
> dc->desc = info->desc;
> k->vendor_id = PCI_VENDOR_ID_INTEL;
> k->class_id = PCI_CLASS_NETWORK_ETHERNET;
> diff --git a/hw/escc.c b/hw/escc.c
> index 4d8a8e8..16ef823 100644
> --- a/hw/escc.c
> +++ b/hw/escc.c
> @@ -921,7 +921,7 @@ static void escc_class_init(ObjectClass *klass, void *data)
> k->init = escc_init1;
> dc->reset = escc_reset;
> dc->vmsd =&vmstate_escc;
> - dc->props = escc_properties;
> + klass->props = escc_properties;
> }
>
> static TypeInfo escc_info = {
> diff --git a/hw/esp.c b/hw/esp.c
> index 8d73e56..b20d6a3 100644
> --- a/hw/esp.c
> +++ b/hw/esp.c
> @@ -766,7 +766,7 @@ static void esp_class_init(ObjectClass *klass, void *data)
> k->init = esp_init1;
> dc->reset = esp_hard_reset;
> dc->vmsd =&vmstate_esp;
> - dc->props = esp_properties;
> + klass->props = esp_properties;
> }
>
> static TypeInfo esp_info = {
> diff --git a/hw/etraxfs_eth.c b/hw/etraxfs_eth.c
> index 16a0637..30ad08e 100644
> --- a/hw/etraxfs_eth.c
> +++ b/hw/etraxfs_eth.c
> @@ -623,11 +623,10 @@ static Property etraxfs_eth_properties[] = {
>
> static void etraxfs_eth_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = fs_eth_init;
> - dc->props = etraxfs_eth_properties;
> + klass->props = etraxfs_eth_properties;
> }
>
> static TypeInfo etraxfs_eth_info = {
> diff --git a/hw/etraxfs_pic.c b/hw/etraxfs_pic.c
> index dc27f88..ad8c537 100644
> --- a/hw/etraxfs_pic.c
> +++ b/hw/etraxfs_pic.c
> @@ -158,11 +158,10 @@ static Property etraxfs_pic_properties[] = {
>
> static void etraxfs_pic_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = etraxfs_pic_init;
> - dc->props = etraxfs_pic_properties;
> + klass->props = etraxfs_pic_properties;
> }
>
> static TypeInfo etraxfs_pic_info = {
> diff --git a/hw/exynos4210_combiner.c b/hw/exynos4210_combiner.c
> index 80af22c..265f511 100644
> --- a/hw/exynos4210_combiner.c
> +++ b/hw/exynos4210_combiner.c
> @@ -440,7 +440,7 @@ static void exynos4210_combiner_class_init(ObjectClass *klass, void *data)
>
> k->init = exynos4210_combiner_init;
> dc->reset = exynos4210_combiner_reset;
> - dc->props = exynos4210_combiner_properties;
> + klass->props = exynos4210_combiner_properties;
> dc->vmsd =&vmstate_exynos4210_combiner;
> }
>
> diff --git a/hw/exynos4210_gic.c b/hw/exynos4210_gic.c
> index e1b215e..b9e2167 100644
> --- a/hw/exynos4210_gic.c
> +++ b/hw/exynos4210_gic.c
> @@ -341,11 +341,10 @@ static Property exynos4210_gic_properties[] = {
>
> static void exynos4210_gic_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = exynos4210_gic_init;
> - dc->props = exynos4210_gic_properties;
> + klass->props = exynos4210_gic_properties;
> }
>
> static TypeInfo exynos4210_gic_info = {
> diff --git a/hw/exynos4210_uart.c b/hw/exynos4210_uart.c
> index ccc4780..9115f0b 100644
> --- a/hw/exynos4210_uart.c
> +++ b/hw/exynos4210_uart.c
> @@ -657,7 +657,7 @@ static void exynos4210_uart_class_init(ObjectClass *klass, void *data)
>
> k->init = exynos4210_uart_init;
> dc->reset = exynos4210_uart_reset;
> - dc->props = exynos4210_uart_properties;
> + klass->props = exynos4210_uart_properties;
> dc->vmsd =&vmstate_exynos4210_uart;
> }
>
> diff --git a/hw/fdc.c b/hw/fdc.c
> index 30d34e3..da30323 100644
> --- a/hw/fdc.c
> +++ b/hw/fdc.c
> @@ -2062,7 +2062,7 @@ static void isabus_fdc_class_init1(ObjectClass *klass, void *data)
> dc->no_user = 1;
> dc->reset = fdctrl_external_reset_isa;
> dc->vmsd =&vmstate_isa_fdc;
> - dc->props = isa_fdc_properties;
> + klass->props = isa_fdc_properties;
> }
>
> static TypeInfo isa_fdc_info = {
> @@ -2096,7 +2096,7 @@ static void sysbus_fdc_class_init(ObjectClass *klass, void *data)
> k->init = sysbus_fdc_init1;
> dc->reset = fdctrl_external_reset_sysbus;
> dc->vmsd =&vmstate_sysbus_fdc;
> - dc->props = sysbus_fdc_properties;
> + klass->props = sysbus_fdc_properties;
> }
>
> static TypeInfo sysbus_fdc_info = {
> @@ -2119,7 +2119,7 @@ static void sun4m_fdc_class_init(ObjectClass *klass, void *data)
> k->init = sun4m_fdc_init1;
> dc->reset = fdctrl_external_reset_sysbus;
> dc->vmsd =&vmstate_sysbus_fdc;
> - dc->props = sun4m_fdc_properties;
> + klass->props = sun4m_fdc_properties;
> }
>
> static TypeInfo sun4m_fdc_info = {
> diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c
> index 7b3b576..5c3a388 100644
> --- a/hw/fw_cfg.c
> +++ b/hw/fw_cfg.c
> @@ -546,7 +546,7 @@ static void fw_cfg_class_init(ObjectClass *klass, void *data)
> dc->no_user = 1;
> dc->reset = fw_cfg_reset;
> dc->vmsd =&vmstate_fw_cfg;
> - dc->props = fw_cfg_properties;
> + klass->props = fw_cfg_properties;
> }
>
> static TypeInfo fw_cfg_info = {
> diff --git a/hw/g364fb.c b/hw/g364fb.c
> index 3a0b68f..597f004 100644
> --- a/hw/g364fb.c
> +++ b/hw/g364fb.c
> @@ -564,7 +564,7 @@ static void g364fb_sysbus_class_init(ObjectClass *klass, void *data)
> dc->desc = "G364 framebuffer";
> dc->reset = g364fb_sysbus_reset;
> dc->vmsd =&vmstate_g364fb;
> - dc->props = g364fb_sysbus_properties;
> + klass->props = g364fb_sysbus_properties;
> }
>
> static TypeInfo g364fb_sysbus_info = {
> diff --git a/hw/grlib_apbuart.c b/hw/grlib_apbuart.c
> index 73fc989..f64747d 100644
> --- a/hw/grlib_apbuart.c
> +++ b/hw/grlib_apbuart.c
> @@ -249,11 +249,10 @@ static Property grlib_gptimer_properties[] = {
>
> static void grlib_gptimer_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = grlib_apbuart_init;
> - dc->props = grlib_gptimer_properties;
> + klass->props = grlib_gptimer_properties;
> }
>
> static TypeInfo grlib_gptimer_info = {
> diff --git a/hw/grlib_gptimer.c b/hw/grlib_gptimer.c
> index 41770a9..c44b1fd 100644
> --- a/hw/grlib_gptimer.c
> +++ b/hw/grlib_gptimer.c
> @@ -386,7 +386,7 @@ static void grlib_gptimer_class_init(ObjectClass *klass, void *data)
>
> k->init = grlib_gptimer_init;
> dc->reset = grlib_gptimer_reset;
> - dc->props = grlib_gptimer_properties;
> + klass->props = grlib_gptimer_properties;
> }
>
> static TypeInfo grlib_gptimer_info = {
> diff --git a/hw/grlib_irqmp.c b/hw/grlib_irqmp.c
> index 0f6e65c..3bbfcec 100644
> --- a/hw/grlib_irqmp.c
> +++ b/hw/grlib_irqmp.c
> @@ -367,7 +367,7 @@ static void grlib_irqmp_class_init(ObjectClass *klass, void *data)
>
> k->init = grlib_irqmp_init;
> dc->reset = grlib_irqmp_reset;
> - dc->props = grlib_irqmp_properties;
> + klass->props = grlib_irqmp_properties;
> }
>
> static TypeInfo grlib_irqmp_info = {
> diff --git a/hw/gus.c b/hw/gus.c
> index 840d098..1bc81a9 100644
> --- a/hw/gus.c
> +++ b/hw/gus.c
> @@ -314,7 +314,7 @@ static void gus_class_initfn (ObjectClass *klass, void *data)
> ic->init = gus_initfn;
> dc->desc = "Gravis Ultrasound GF1";
> dc->vmsd =&vmstate_gus;
> - dc->props = gus_properties;
> + klass->props = gus_properties;
> }
>
> static TypeInfo gus_info = {
> diff --git a/hw/hda-audio.c b/hw/hda-audio.c
> index 36761dd..d457a7c 100644
> --- a/hw/hda-audio.c
> +++ b/hw/hda-audio.c
> @@ -1036,7 +1036,7 @@ static void hda_audio_output_class_init(ObjectClass *klass, void *data)
> k->stream = hda_audio_stream;
> dc->desc = "HDA Audio Codec, output-only (line-out)";
> dc->vmsd =&vmstate_hda_audio;
> - dc->props = hda_audio_properties;
> + klass->props = hda_audio_properties;
> }
>
> static TypeInfo hda_audio_output_info = {
> @@ -1057,7 +1057,7 @@ static void hda_audio_duplex_class_init(ObjectClass *klass, void *data)
> k->stream = hda_audio_stream;
> dc->desc = "HDA Audio Codec, duplex (line-out, line-in)";
> dc->vmsd =&vmstate_hda_audio;
> - dc->props = hda_audio_properties;
> + klass->props = hda_audio_properties;
> }
>
> static TypeInfo hda_audio_duplex_info = {
> @@ -1078,7 +1078,7 @@ static void hda_audio_micro_class_init(ObjectClass *klass, void *data)
> k->stream = hda_audio_stream;
> dc->desc = "HDA Audio Codec, duplex (speaker, microphone)";
> dc->vmsd =&vmstate_hda_audio;
> - dc->props = hda_audio_properties;
> + klass->props = hda_audio_properties;
> }
>
> static TypeInfo hda_audio_micro_info = {
> diff --git a/hw/hpet.c b/hw/hpet.c
> index fd3ddca..126e78b 100644
> --- a/hw/hpet.c
> +++ b/hw/hpet.c
> @@ -742,7 +742,7 @@ static void hpet_device_class_init(ObjectClass *klass, void *data)
> dc->no_user = 1;
> dc->reset = hpet_reset;
> dc->vmsd =&vmstate_hpet;
> - dc->props = hpet_device_properties;
> + klass->props = hpet_device_properties;
> }
>
> static TypeInfo hpet_device_info = {
> diff --git a/hw/i2c.c b/hw/i2c.c
> index 296bece..1a83dda 100644
> --- a/hw/i2c.c
> +++ b/hw/i2c.c
> @@ -225,7 +225,7 @@ static void i2c_slave_class_init(ObjectClass *klass, void *data)
> DeviceClass *k = DEVICE_CLASS(klass);
> k->init = i2c_slave_qdev_init;
> k->bus_type = TYPE_I2C_BUS;
> - k->props = i2c_props;
> + klass->props = i2c_props;
> }
>
> static TypeInfo i2c_slave_type_info = {
> diff --git a/hw/i82374.c b/hw/i82374.c
> index 4a922c3..278ff2c 100644
> --- a/hw/i82374.c
> +++ b/hw/i82374.c
> @@ -150,7 +150,7 @@ static void i82374_class_init(ObjectClass *klass, void *data)
>
> k->init = i82374_isa_init;
> dc->vmsd =&vmstate_isa_i82374;
> - dc->props = i82374_properties;
> + klass->props = i82374_properties;
> }
>
> static TypeInfo i82374_isa_info = {
> diff --git a/hw/i82378.c b/hw/i82378.c
> index 9b11d90..25c3ad2 100644
> --- a/hw/i82378.c
> +++ b/hw/i82378.c
> @@ -260,7 +260,7 @@ static void pci_i82378_class_init(ObjectClass *klass, void *data)
> k->subsystem_vendor_id = 0x0;
> k->subsystem_id = 0x0;
> dc->vmsd =&vmstate_pci_i82378;
> - dc->props = i82378_properties;
> + klass->props = i82378_properties;
> }
>
> static TypeInfo pci_i82378_info = {
> diff --git a/hw/i8254.c b/hw/i8254.c
> index 77bd5e8..9be9dbc 100644
> --- a/hw/i8254.c
> +++ b/hw/i8254.c
> @@ -342,7 +342,7 @@ static void pit_class_initfn(ObjectClass *klass, void *data)
> k->get_channel_info = pit_get_channel_info_common;
> k->post_load = pit_post_load;
> dc->reset = pit_reset;
> - dc->props = pit_properties;
> + klass->props = pit_properties;
> }
>
> static TypeInfo pit_info = {
> diff --git a/hw/i8259_common.c b/hw/i8259_common.c
> index ab3d98b..a91d1e5 100644
> --- a/hw/i8259_common.c
> +++ b/hw/i8259_common.c
> @@ -140,7 +140,7 @@ static void pic_common_class_init(ObjectClass *klass, void *data)
>
> dc->vmsd =&vmstate_pic_common;
> dc->no_user = 1;
> - dc->props = pic_properties_common;
> + klass->props = pic_properties_common;
> ic->init = pic_init_common;
> }
>
> diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
> index 2d7d03d..082b639 100644
> --- a/hw/ide/ahci.c
> +++ b/hw/ide/ahci.c
> @@ -1202,7 +1202,7 @@ static void sysbus_ahci_class_init(ObjectClass *klass, void *data)
>
> sbc->init = sysbus_ahci_init;
> dc->vmsd =&vmstate_sysbus_ahci;
> - dc->props = sysbus_ahci_properties;
> + klass->props = sysbus_ahci_properties;
> }
>
> static TypeInfo sysbus_ahci_info = {
> diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
> index bf8ece4..ab4cfdd 100644
> --- a/hw/ide/cmd646.c
> +++ b/hw/ide/cmd646.c
> @@ -332,7 +332,6 @@ static Property cmd646_ide_properties[] = {
>
> static void cmd646_ide_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
>
> k->init = pci_cmd646_ide_initfn;
> @@ -341,7 +340,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, void *data)
> k->device_id = PCI_DEVICE_ID_CMD_646;
> k->revision = 0x07;
> k->class_id = PCI_CLASS_STORAGE_IDE;
> - dc->props = cmd646_ide_properties;
> + klass->props = cmd646_ide_properties;
> }
>
> static TypeInfo cmd646_ide_info = {
> diff --git a/hw/ide/isa.c b/hw/ide/isa.c
> index 8ab2718..c2faba9 100644
> --- a/hw/ide/isa.c
> +++ b/hw/ide/isa.c
> @@ -108,7 +108,7 @@ static void isa_ide_class_initfn(ObjectClass *klass, void *data)
> ic->init = isa_ide_initfn;
> dc->fw_name = "ide";
> dc->reset = isa_ide_reset;
> - dc->props = isa_ide_properties;
> + klass->props = isa_ide_properties;
> }
>
> static TypeInfo isa_ide_info = {
> diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
> index c122395..7a92be8 100644
> --- a/hw/ide/qdev.c
> +++ b/hw/ide/qdev.c
> @@ -199,7 +199,7 @@ static void ide_hd_class_init(ObjectClass *klass, void *data)
> k->init = ide_hd_initfn;
> dc->fw_name = "drive";
> dc->desc = "virtual IDE disk";
> - dc->props = ide_hd_properties;
> + klass->props = ide_hd_properties;
> }
>
> static TypeInfo ide_hd_info = {
> @@ -221,7 +221,7 @@ static void ide_cd_class_init(ObjectClass *klass, void *data)
> k->init = ide_cd_initfn;
> dc->fw_name = "drive";
> dc->desc = "virtual IDE CD-ROM";
> - dc->props = ide_cd_properties;
> + klass->props = ide_cd_properties;
> }
>
> static TypeInfo ide_cd_info = {
> @@ -243,7 +243,7 @@ static void ide_drive_class_init(ObjectClass *klass, void *data)
> k->init = ide_drive_initfn;
> dc->fw_name = "drive";
> dc->desc = "virtual IDE disk or CD-ROM (legacy)";
> - dc->props = ide_drive_properties;
> + klass->props = ide_drive_properties;
> }
>
> static TypeInfo ide_drive_info = {
> @@ -258,7 +258,7 @@ static void ide_device_class_init(ObjectClass *klass, void *data)
> DeviceClass *k = DEVICE_CLASS(klass);
> k->init = ide_qdev_init;
> k->bus_type = TYPE_IDE_BUS;
> - k->props = ide_props;
> + klass->props = ide_props;
> }
>
> static TypeInfo ide_device_type_info = {
> diff --git a/hw/integratorcp.c b/hw/integratorcp.c
> index deacbf4..eb970ea 100644
> --- a/hw/integratorcp.c
> +++ b/hw/integratorcp.c
> @@ -526,11 +526,10 @@ static Property core_properties[] = {
>
> static void core_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = integratorcm_init;
> - dc->props = core_properties;
> + klass->props = core_properties;
> }
>
> static TypeInfo core_info = {
> diff --git a/hw/intel-hda.c b/hw/intel-hda.c
> index c11fd30..766fc91 100644
> --- a/hw/intel-hda.c
> +++ b/hw/intel-hda.c
> @@ -1265,7 +1265,7 @@ static void intel_hda_class_init(ObjectClass *klass, void *data)
> dc->desc = "Intel HD Audio Controller";
> dc->reset = intel_hda_reset;
> dc->vmsd =&vmstate_intel_hda;
> - dc->props = intel_hda_properties;
> + klass->props = intel_hda_properties;
> }
>
> static TypeInfo intel_hda_info = {
> @@ -1281,7 +1281,7 @@ static void hda_codec_device_class_init(ObjectClass *klass, void *data)
> k->init = hda_codec_dev_init;
> k->exit = hda_codec_dev_exit;
> k->bus_type = TYPE_HDA_BUS;
> - k->props = hda_props;
> + klass->props = hda_props;
> }
>
> static TypeInfo hda_codec_device_type_info = {
> diff --git a/hw/ioh3420.c b/hw/ioh3420.c
> index 1632d31..cfb8507 100644
> --- a/hw/ioh3420.c
> +++ b/hw/ioh3420.c
> @@ -227,7 +227,7 @@ static void ioh3420_class_init(ObjectClass *klass, void *data)
> dc->desc = "Intel IOH device id 3420 PCIE Root Port";
> dc->reset = ioh3420_reset;
> dc->vmsd =&vmstate_ioh3420;
> - dc->props = ioh3420_properties;
> + klass->props = ioh3420_properties;
> }
>
> static TypeInfo ioh3420_info = {
> diff --git a/hw/ivshmem.c b/hw/ivshmem.c
> index d48e5f9..ccb08dc 100644
> --- a/hw/ivshmem.c
> +++ b/hw/ivshmem.c
> @@ -806,7 +806,7 @@ static void ivshmem_class_init(ObjectClass *klass, void *data)
> k->device_id = 0x1110;
> k->class_id = PCI_CLASS_MEMORY_RAM;
> dc->reset = ivshmem_reset;
> - dc->props = ivshmem_properties;
> + klass->props = ivshmem_properties;
> }
>
> static TypeInfo ivshmem_info = {
> diff --git a/hw/kvm/i8254.c b/hw/kvm/i8254.c
> index bb5fe07..9e7dba9 100644
> --- a/hw/kvm/i8254.c
> +++ b/hw/kvm/i8254.c
> @@ -236,7 +236,7 @@ static void kvm_pit_class_init(ObjectClass *klass, void *data)
> k->pre_save = kvm_pit_get;
> k->post_load = kvm_pit_put;
> dc->reset = kvm_pit_reset;
> - dc->props = kvm_pit_properties;
> + klass->props = kvm_pit_properties;
> }
>
> static TypeInfo kvm_pit_info = {
> diff --git a/hw/kvm/ioapic.c b/hw/kvm/ioapic.c
> index 3ae3175..d57b11b 100644
> --- a/hw/kvm/ioapic.c
> +++ b/hw/kvm/ioapic.c
> @@ -107,7 +107,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;
> + klass->props = kvm_ioapic_properties;
> }
>
> static TypeInfo kvm_ioapic_info = {
> diff --git a/hw/lan9118.c b/hw/lan9118.c
> index 7b4fe87..dbefefb 100644
> --- a/hw/lan9118.c
> +++ b/hw/lan9118.c
> @@ -1362,7 +1362,7 @@ static void lan9118_class_init(ObjectClass *klass, void *data)
>
> k->init = lan9118_init1;
> dc->reset = lan9118_reset;
> - dc->props = lan9118_properties;
> + klass->props = lan9118_properties;
> dc->vmsd =&vmstate_lan9118;
> }
>
> diff --git a/hw/lance.c b/hw/lance.c
> index ce3d46c..a7e3dca 100644
> --- a/hw/lance.c
> +++ b/hw/lance.c
> @@ -152,7 +152,7 @@ static void lance_class_init(ObjectClass *klass, void *data)
> dc->fw_name = "ethernet";
> dc->reset = lance_reset;
> dc->vmsd =&vmstate_lance;
> - dc->props = lance_properties;
> + klass->props = lance_properties;
> }
>
> static TypeInfo lance_info = {
> diff --git a/hw/lm32_sys.c b/hw/lm32_sys.c
> index bbe03c4..99fef79 100644
> --- a/hw/lm32_sys.c
> +++ b/hw/lm32_sys.c
> @@ -154,7 +154,7 @@ static void lm32_sys_class_init(ObjectClass *klass, void *data)
> k->init = lm32_sys_init;
> dc->reset = sys_reset;
> dc->vmsd =&vmstate_lm32_sys;
> - dc->props = lm32_sys_properties;
> + klass->props = lm32_sys_properties;
> }
>
> static TypeInfo lm32_sys_info = {
> diff --git a/hw/lm32_timer.c b/hw/lm32_timer.c
> index e9450a0..f3a20ff 100644
> --- a/hw/lm32_timer.c
> +++ b/hw/lm32_timer.c
> @@ -212,7 +212,7 @@ static void lm32_timer_class_init(ObjectClass *klass, void *data)
> k->init = lm32_timer_init;
> dc->reset = timer_reset;
> dc->vmsd =&vmstate_lm32_timer;
> - dc->props = lm32_timer_properties;
> + klass->props = lm32_timer_properties;
> }
>
> static TypeInfo lm32_timer_info = {
> diff --git a/hw/m48t59.c b/hw/m48t59.c
> index d55d073..97e965d 100644
> --- a/hw/m48t59.c
> +++ b/hw/m48t59.c
> @@ -738,7 +738,7 @@ static void m48t59_init_class_isa1(ObjectClass *klass, void *data)
> ic->init = m48t59_init_isa1;
> dc->no_user = 1;
> dc->reset = m48t59_reset_isa;
> - dc->props = m48t59_isa_properties;
> + klass->props = m48t59_isa_properties;
> }
>
> static TypeInfo m48t59_isa_info = {
> @@ -762,7 +762,7 @@ static void m48t59_class_init(ObjectClass *klass, void *data)
>
> k->init = m48t59_init1;
> dc->reset = m48t59_reset_sysbus;
> - dc->props = m48t59_properties;
> + klass->props = m48t59_properties;
> }
>
> static TypeInfo m48t59_info = {
> diff --git a/hw/marvell_88w8618_audio.c b/hw/marvell_88w8618_audio.c
> index f6f1937..9cb70f2 100644
> --- a/hw/marvell_88w8618_audio.c
> +++ b/hw/marvell_88w8618_audio.c
> @@ -285,7 +285,7 @@ static void mv88w8618_audio_class_init(ObjectClass *klass, void *data)
> k->init = mv88w8618_audio_init;
> dc->reset = mv88w8618_audio_reset;
> dc->vmsd =&mv88w8618_audio_vmsd;
> - dc->props = mv88w8618_audio_properties;
> + klass->props = mv88w8618_audio_properties;
> }
>
> static TypeInfo mv88w8618_audio_info = {
> diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
> index 3777f85..9c9b23c 100644
> --- a/hw/mc146818rtc.c
> +++ b/hw/mc146818rtc.c
> @@ -697,7 +697,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data)
> ic->init = rtc_initfn;
> dc->no_user = 1;
> dc->vmsd =&vmstate_rtc;
> - dc->props = mc146818rtc_properties;
> + klass->props = mc146818rtc_properties;
> }
>
> static TypeInfo mc146818rtc_info = {
> diff --git a/hw/milkymist-minimac2.c b/hw/milkymist-minimac2.c
> index 70bf336..5bdb5e5 100644
> --- a/hw/milkymist-minimac2.c
> +++ b/hw/milkymist-minimac2.c
> @@ -532,7 +532,7 @@ static void milkymist_minimac2_class_init(ObjectClass *klass, void *data)
> k->init = milkymist_minimac2_init;
> dc->reset = milkymist_minimac2_reset;
> dc->vmsd =&vmstate_milkymist_minimac2;
> - dc->props = milkymist_minimac2_properties;
> + klass->props = milkymist_minimac2_properties;
> }
>
> static TypeInfo milkymist_minimac2_info = {
> diff --git a/hw/milkymist-softusb.c b/hw/milkymist-softusb.c
> index ecc2be9..e44d007 100644
> --- a/hw/milkymist-softusb.c
> +++ b/hw/milkymist-softusb.c
> @@ -313,7 +313,7 @@ static void milkymist_softusb_class_init(ObjectClass *klass, void *data)
> k->init = milkymist_softusb_init;
> dc->reset = milkymist_softusb_reset;
> dc->vmsd =&vmstate_milkymist_softusb;
> - dc->props = milkymist_softusb_properties;
> + klass->props = milkymist_softusb_properties;
> }
>
> static TypeInfo milkymist_softusb_info = {
> diff --git a/hw/milkymist-sysctl.c b/hw/milkymist-sysctl.c
> index 8878d2b..6caabd9 100644
> --- a/hw/milkymist-sysctl.c
> +++ b/hw/milkymist-sysctl.c
> @@ -320,7 +320,7 @@ static void milkymist_sysctl_class_init(ObjectClass *klass, void *data)
> k->init = milkymist_sysctl_init;
> dc->reset = milkymist_sysctl_reset;
> dc->vmsd =&vmstate_milkymist_sysctl;
> - dc->props = milkymist_sysctl_properties;
> + klass->props = milkymist_sysctl_properties;
> }
>
> static TypeInfo milkymist_sysctl_info = {
> diff --git a/hw/milkymist-vgafb.c b/hw/milkymist-vgafb.c
> index cd4365d..7cf00ef 100644
> --- a/hw/milkymist-vgafb.c
> +++ b/hw/milkymist-vgafb.c
> @@ -316,7 +316,7 @@ static void milkymist_vgafb_class_init(ObjectClass *klass, void *data)
> k->init = milkymist_vgafb_init;
> dc->reset = milkymist_vgafb_reset;
> dc->vmsd =&vmstate_milkymist_vgafb;
> - dc->props = milkymist_vgafb_properties;
> + klass->props = milkymist_vgafb_properties;
> }
>
> static TypeInfo milkymist_vgafb_info = {
> diff --git a/hw/mipsnet.c b/hw/mipsnet.c
> index 3107246..50876bc 100644
> --- a/hw/mipsnet.c
> +++ b/hw/mipsnet.c
> @@ -266,7 +266,7 @@ static void mipsnet_class_init(ObjectClass *klass, void *data)
> dc->desc = "MIPS Simulator network device";
> dc->reset = mipsnet_sysbus_reset;
> dc->vmsd =&vmstate_mipsnet;
> - dc->props = mipsnet_properties;
> + klass->props = mipsnet_properties;
> }
>
> static TypeInfo mipsnet_info = {
> diff --git a/hw/musicpal.c b/hw/musicpal.c
> index f14f20d..166f6bf 100644
> --- a/hw/musicpal.c
> +++ b/hw/musicpal.c
> @@ -424,7 +424,7 @@ static void mv88w8618_eth_class_init(ObjectClass *klass, void *data)
>
> k->init = mv88w8618_eth_init;
> dc->vmsd =&mv88w8618_eth_vmsd;
> - dc->props = mv88w8618_eth_properties;
> + klass->props = mv88w8618_eth_properties;
> }
>
> static TypeInfo mv88w8618_eth_info = {
> diff --git a/hw/nand.c b/hw/nand.c
> index e9501ae..460f2fe 100644
> --- a/hw/nand.c
> +++ b/hw/nand.c
> @@ -432,7 +432,7 @@ static void nand_class_init(ObjectClass *klass, void *data)
> k->init = nand_device_init;
> dc->reset = nand_reset;
> dc->vmsd =&vmstate_nand;
> - dc->props = nand_properties;
> + klass->props = nand_properties;
> }
>
> static TypeInfo nand_info = {
> diff --git a/hw/ne2000-isa.c b/hw/ne2000-isa.c
> index a4a783a..a38da68 100644
> --- a/hw/ne2000-isa.c
> +++ b/hw/ne2000-isa.c
> @@ -91,10 +91,9 @@ static Property ne2000_isa_properties[] = {
>
> static void isa_ne2000_class_initfn(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
> ic->init = isa_ne2000_initfn;
> - dc->props = ne2000_isa_properties;
> + klass->props = ne2000_isa_properties;
> }
>
> static TypeInfo ne2000_isa_info = {
> diff --git a/hw/ne2000.c b/hw/ne2000.c
> index d02e60c..f5eab22 100644
> --- a/hw/ne2000.c
> +++ b/hw/ne2000.c
> @@ -771,7 +771,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data)
> k->device_id = PCI_DEVICE_ID_REALTEK_8029;
> k->class_id = PCI_CLASS_NETWORK_ETHERNET;
> dc->vmsd =&vmstate_pci_ne2000;
> - dc->props = ne2000_properties;
> + klass->props = ne2000_properties;
> }
>
> static TypeInfo ne2000_info = {
> diff --git a/hw/omap_gpio.c b/hw/omap_gpio.c
> index 201ff77..b4fba0b 100644
> --- a/hw/omap_gpio.c
> +++ b/hw/omap_gpio.c
> @@ -744,7 +744,7 @@ static void omap_gpio_class_init(ObjectClass *klass, void *data)
>
> k->init = omap_gpio_init;
> dc->reset = omap_gpif_reset;
> - dc->props = omap_gpio_properties;
> + klass->props = omap_gpio_properties;
> }
>
> static TypeInfo omap_gpio_info = {
> @@ -773,7 +773,7 @@ static void omap2_gpio_class_init(ObjectClass *klass, void *data)
>
> k->init = omap2_gpio_init;
> dc->reset = omap2_gpif_reset;
> - dc->props = omap2_gpio_properties;
> + klass->props = omap2_gpio_properties;
> }
>
> static TypeInfo omap2_gpio_info = {
> diff --git a/hw/omap_i2c.c b/hw/omap_i2c.c
> index 20bc82e..280c622 100644
> --- a/hw/omap_i2c.c
> +++ b/hw/omap_i2c.c
> @@ -467,7 +467,7 @@ static void omap_i2c_class_init(ObjectClass *klass, void *data)
> DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
> k->init = omap_i2c_init;
> - dc->props = omap_i2c_properties;
> + klass->props = omap_i2c_properties;
> dc->reset = omap_i2c_reset;
> }
>
> diff --git a/hw/omap_intc.c b/hw/omap_intc.c
> index 5076e07..7f98a3e 100644
> --- a/hw/omap_intc.c
> +++ b/hw/omap_intc.c
> @@ -386,7 +386,7 @@ static void omap_intc_class_init(ObjectClass *klass, void *data)
>
> k->init = omap_intc_init;
> dc->reset = omap_inth_reset;
> - dc->props = omap_intc_properties;
> + klass->props = omap_intc_properties;
> }
>
> static TypeInfo omap_intc_info = {
> @@ -630,7 +630,7 @@ static void omap2_intc_class_init(ObjectClass *klass, void *data)
>
> k->init = omap2_intc_init;
> dc->reset = omap_inth_reset;
> - dc->props = omap2_intc_properties;
> + klass->props = omap2_intc_properties;
> }
>
> static TypeInfo omap2_intc_info = {
> diff --git a/hw/onenand.c b/hw/onenand.c
> index db6af68..05126dc 100644
> --- a/hw/onenand.c
> +++ b/hw/onenand.c
> @@ -818,7 +818,7 @@ static void onenand_class_init(ObjectClass *klass, void *data)
>
> k->init = onenand_initfn;
> dc->reset = onenand_system_reset;
> - dc->props = onenand_properties;
> + klass->props = onenand_properties;
> }
>
> static TypeInfo onenand_info = {
> diff --git a/hw/opencores_eth.c b/hw/opencores_eth.c
> index 350f731..1007f46 100644
> --- a/hw/opencores_eth.c
> +++ b/hw/opencores_eth.c
> @@ -715,7 +715,7 @@ static void open_eth_class_init(ObjectClass *klass, void *data)
> k->init = sysbus_open_eth_init;
> dc->desc = "Opencores 10/100 Mbit Ethernet";
> dc->reset = qdev_open_eth_reset;
> - dc->props = open_eth_properties;
> + klass->props = open_eth_properties;
> }
>
> static TypeInfo open_eth_info = {
> diff --git a/hw/parallel.c b/hw/parallel.c
> index 219f384..f3fdbdb 100644
> --- a/hw/parallel.c
> +++ b/hw/parallel.c
> @@ -593,10 +593,9 @@ static Property parallel_isa_properties[] = {
>
> static void parallel_isa_class_initfn(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
> ic->init = parallel_isa_initfn;
> - dc->props = parallel_isa_properties;
> + klass->props = parallel_isa_properties;
> }
>
> static TypeInfo parallel_isa_info = {
> diff --git a/hw/pc_sysfw.c b/hw/pc_sysfw.c
> index f0d7c21..d861c16 100644
> --- a/hw/pc_sysfw.c
> +++ b/hw/pc_sysfw.c
> @@ -246,7 +246,7 @@ static void pcsysfw_class_init (ObjectClass *klass, void *data)
>
> dc->desc = "PC System Firmware";
> dc->init = pcsysfw_init;
> - dc->props = pcsysfw_properties;
> + klass->props = pcsysfw_properties;
> }
>
> static TypeInfo pcsysfw_info = {
> diff --git a/hw/pci.c b/hw/pci.c
> index d6ce9a5..4068e07 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -2010,7 +2010,7 @@ static void pci_device_class_init(ObjectClass *klass, void *data)
> k->unplug = pci_unplug_device;
> k->exit = pci_unregister_device;
> k->bus_type = TYPE_PCI_BUS;
> - k->props = pci_props;
> + klass->props = pci_props;
> }
>
> static TypeInfo pci_device_type_info = {
> diff --git a/hw/pci_bridge_dev.c b/hw/pci_bridge_dev.c
> index eccaa58..25ef263 100644
> --- a/hw/pci_bridge_dev.c
> +++ b/hw/pci_bridge_dev.c
> @@ -155,8 +155,8 @@ static void pci_bridge_dev_class_init(ObjectClass *klass, void *data)
> k->is_bridge = 1,
> dc->desc = "Standard PCI Bridge";
> dc->reset = qdev_pci_bridge_dev_reset;
> - dc->props = pci_bridge_dev_properties;
> dc->vmsd =&pci_bridge_dev_vmstate;
> + klass->props = pci_bridge_dev_properties;
> }
>
> static TypeInfo pci_bridge_dev_info = {
> diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
> index 34d73aa..a322046 100644
> --- a/hw/pcnet-pci.c
> +++ b/hw/pcnet-pci.c
> @@ -359,7 +359,7 @@ static void pcnet_class_init(ObjectClass *klass, void *data)
> k->class_id = PCI_CLASS_NETWORK_ETHERNET;
> dc->reset = pci_reset;
> dc->vmsd =&vmstate_pci_pcnet;
> - dc->props = pcnet_properties;
> + klass->props = pcnet_properties;
> }
>
> static TypeInfo pcnet_info = {
> diff --git a/hw/pcspk.c b/hw/pcspk.c
> index e430324..f33eac2 100644
> --- a/hw/pcspk.c
> +++ b/hw/pcspk.c
> @@ -184,7 +184,7 @@ static void pcspk_class_initfn(ObjectClass *klass, void *data)
>
> ic->init = pcspk_initfn;
> dc->no_user = 1;
> - dc->props = pcspk_properties;
> + klass->props = pcspk_properties;
> }
>
> static TypeInfo pcspk_info = {
> diff --git a/hw/pl041.c b/hw/pl041.c
> index b6723be..5a035e1 100644
> --- a/hw/pl041.c
> +++ b/hw/pl041.c
> @@ -628,7 +628,7 @@ static void pl041_device_class_init(ObjectClass *klass, void *data)
> dc->no_user = 1;
> dc->reset = pl041_device_reset;
> dc->vmsd =&vmstate_pl041;
> - dc->props = pl041_device_properties;
> + klass->props = pl041_device_properties;
> }
>
> static TypeInfo pl041_device_info = {
> diff --git a/hw/pxa2xx.c b/hw/pxa2xx.c
> index 7958d14..cdbbc47 100644
> --- a/hw/pxa2xx.c
> +++ b/hw/pxa2xx.c
> @@ -1556,7 +1556,7 @@ static void pxa2xx_i2c_class_init(ObjectClass *klass, void *data)
> k->init = pxa2xx_i2c_initfn;
> dc->desc = "PXA2xx I2C Bus Controller";
> dc->vmsd =&vmstate_pxa2xx_i2c;
> - dc->props = pxa2xx_i2c_properties;
> + klass->props = pxa2xx_i2c_properties;
> }
>
> static TypeInfo pxa2xx_i2c_info = {
> diff --git a/hw/pxa2xx_dma.c b/hw/pxa2xx_dma.c
> index 0310154..aef039f 100644
> --- a/hw/pxa2xx_dma.c
> +++ b/hw/pxa2xx_dma.c
> @@ -556,7 +556,7 @@ static void pxa2xx_dma_class_init(ObjectClass *klass, void *data)
> k->init = pxa2xx_dma_init;
> dc->desc = "PXA2xx DMA controller";
> dc->vmsd =&vmstate_pxa2xx_dma;
> - dc->props = pxa2xx_dma_properties;
> + klass->props = pxa2xx_dma_properties;
> }
>
> static TypeInfo pxa2xx_dma_info = {
> diff --git a/hw/pxa2xx_gpio.c b/hw/pxa2xx_gpio.c
> index 3c90c9c..cec3f3e 100644
> --- a/hw/pxa2xx_gpio.c
> +++ b/hw/pxa2xx_gpio.c
> @@ -331,7 +331,7 @@ static void pxa2xx_gpio_class_init(ObjectClass *klass, void *data)
>
> k->init = pxa2xx_gpio_initfn;
> dc->desc = "PXA2xx GPIO controller";
> - dc->props = pxa2xx_gpio_properties;
> + klass->props = pxa2xx_gpio_properties;
> }
>
> static TypeInfo pxa2xx_gpio_info = {
> diff --git a/hw/pxa2xx_timer.c b/hw/pxa2xx_timer.c
> index 77b033b..db2ebe2 100644
> --- a/hw/pxa2xx_timer.c
> +++ b/hw/pxa2xx_timer.c
> @@ -492,7 +492,7 @@ static void pxa25x_timer_dev_class_init(ObjectClass *klass, void *data)
> k->init = pxa2xx_timer_init;
> dc->desc = "PXA25x timer";
> dc->vmsd =&vmstate_pxa2xx_timer_regs;
> - dc->props = pxa25x_timer_dev_properties;
> + klass->props = pxa25x_timer_dev_properties;
> }
>
> static TypeInfo pxa25x_timer_dev_info = {
> @@ -517,7 +517,7 @@ static void pxa27x_timer_dev_class_init(ObjectClass *klass, void *data)
> k->init = pxa2xx_timer_init;
> dc->desc = "PXA27x timer";
> dc->vmsd =&vmstate_pxa2xx_timer_regs;
> - dc->props = pxa27x_timer_dev_properties;
> + klass->props = pxa27x_timer_dev_properties;
> }
>
> static TypeInfo pxa27x_timer_dev_info = {
> diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
> index 17452c8..c02517b 100644
> --- a/hw/qdev-monitor.c
> +++ b/hw/qdev-monitor.c
> @@ -149,7 +149,7 @@ int qdev_device_help(QemuOpts *opts)
> return 0;
> }
> do {
> - for (prop = DEVICE_CLASS(klass)->props; prop&& prop->name; prop++) {
> + for (prop = OBJECT_CLASS(klass)->props; prop&& prop->name; prop++) {
> /*
> * TODO Properties without a parser are just for dirty hacks.
> * qdev_prop_ptr is the only such PropertyInfo. It's marked
> @@ -527,7 +527,7 @@ static void qdev_print(Monitor *mon, DeviceState *dev, int indent)
> }
> class = object_get_class(OBJECT(dev));
> do {
> - qdev_print_props(mon, dev, DEVICE_CLASS(class)->props, indent);
> + qdev_print_props(mon, dev, OBJECT_CLASS(class)->props, indent);
> class = object_class_get_parent(class);
> } while (class != object_class_by_name(TYPE_DEVICE));
> bus_print_dev(dev->parent_bus, mon, dev, indent + 2);
> diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
> index 5187604..7379c1c 100644
> --- a/hw/qdev-properties.c
> +++ b/hw/qdev-properties.c
> @@ -522,7 +522,7 @@ static Property *qdev_prop_find(Object *obj, const char *name)
> /* device properties */
> class = object_get_class(obj);
> do {
> - prop = qdev_prop_walk(DEVICE_CLASS(class)->props, name);
> + prop = qdev_prop_walk(OBJECT_CLASS(class)->props, name);
> if (prop) {
> return prop;
> }
> diff --git a/hw/qdev.c b/hw/qdev.c
> index d4b8f91..1a004f8 100644
> --- a/hw/qdev.c
> +++ b/hw/qdev.c
> @@ -630,9 +630,8 @@ static void device_initfn(Object *obj)
>
> class = object_get_class(OBJECT(dev));
> do {
> - for (prop = DEVICE_CLASS(class)->props; prop&& prop->name; prop++) {
> + for (prop = OBJECT_CLASS(class)->props; prop&& prop->name; prop++) {
> qdev_property_add_legacy(dev, prop, NULL);
> - object_property_add_static(OBJECT(dev), prop, NULL);
> }
> class = object_class_get_parent(class);
> } while (class != object_class_by_name(TYPE_DEVICE));
> @@ -676,16 +675,6 @@ static const char *qdev_get_id(Object *obj)
> return dev->id != NULL ? dev->id : object_get_typename(obj);
> }
>
> -static void device_class_base_init(ObjectClass *class, void *data)
> -{
> - DeviceClass *klass = DEVICE_CLASS(class);
> -
> - /* We explicitly look up properties in the superclasses,
> - * so do not propagate them to the subclasses.
> - */
> - klass->props = NULL;
> -}
> -
> void device_reset(DeviceState *dev)
> {
> DeviceClass *klass = DEVICE_GET_CLASS(dev);
> @@ -717,7 +706,6 @@ static TypeInfo device_type_info = {
> .instance_size = sizeof(DeviceState),
> .instance_init = device_initfn,
> .instance_finalize = device_finalize,
> - .class_base_init = device_class_base_init,
> .class_init = device_class_init,
> .abstract = true,
> .class_size = sizeof(DeviceClass),
> diff --git a/hw/qdev.h b/hw/qdev.h
> index c810d43..168378c 100644
> --- a/hw/qdev.h
> +++ b/hw/qdev.h
> @@ -33,7 +33,6 @@ typedef struct DeviceClass {
>
> const char *fw_name;
> const char *desc;
> - Property *props;
> int no_user;
>
> /* callbacks */
> diff --git a/hw/qxl.c b/hw/qxl.c
> index 3da3399..81b5093 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -2051,7 +2051,7 @@ static void qxl_primary_class_init(ObjectClass *klass, void *data)
> dc->desc = "Spice QXL GPU (primary, vga compatible)";
> dc->reset = qxl_reset_handler;
> dc->vmsd =&qxl_vmstate;
> - dc->props = qxl_properties;
> + klass->props = qxl_properties;
> }
>
> static TypeInfo qxl_primary_info = {
> @@ -2073,7 +2073,7 @@ static void qxl_secondary_class_init(ObjectClass *klass, void *data)
> dc->desc = "Spice QXL GPU (secondary)";
> dc->reset = qxl_reset_handler;
> dc->vmsd =&qxl_vmstate;
> - dc->props = qxl_properties;
> + klass->props = qxl_properties;
> }
>
> static TypeInfo qxl_secondary_info = {
> diff --git a/hw/rtl8139.c b/hw/rtl8139.c
> index eb22d04..2ec1519 100644
> --- a/hw/rtl8139.c
> +++ b/hw/rtl8139.c
> @@ -3525,7 +3525,7 @@ static void rtl8139_class_init(ObjectClass *klass, void *data)
> k->class_id = PCI_CLASS_NETWORK_ETHERNET;
> dc->reset = rtl8139_reset;
> dc->vmsd =&vmstate_rtl8139;
> - dc->props = rtl8139_properties;
> + klass->props = rtl8139_properties;
> }
>
> static TypeInfo rtl8139_info = {
> diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
> index df8d052..fc57b56 100644
> --- a/hw/s390-virtio-bus.c
> +++ b/hw/s390-virtio-bus.c
> @@ -384,11 +384,10 @@ static Property s390_virtio_net_properties[] = {
>
> static void s390_virtio_net_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass);
>
> k->init = s390_virtio_net_init;
> - dc->props = s390_virtio_net_properties;
> + klass->props = s390_virtio_net_properties;
> }
>
> static TypeInfo s390_virtio_net = {
> @@ -409,11 +408,10 @@ static Property s390_virtio_blk_properties[] = {
>
> static void s390_virtio_blk_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass);
>
> k->init = s390_virtio_blk_init;
> - dc->props = s390_virtio_blk_properties;
> + klass->props = s390_virtio_blk_properties;
> }
>
> static TypeInfo s390_virtio_blk = {
> @@ -431,11 +429,10 @@ static Property s390_virtio_serial_properties[] = {
>
> static void s390_virtio_serial_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass);
>
> k->init = s390_virtio_serial_init;
> - dc->props = s390_virtio_serial_properties;
> + klass->props = s390_virtio_serial_properties;
> }
>
> static TypeInfo s390_virtio_serial = {
> @@ -478,11 +475,10 @@ static Property s390_virtio_scsi_properties[] = {
>
> static void s390_virtio_scsi_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass);
>
> k->init = s390_virtio_scsi_init;
> - dc->props = s390_virtio_scsi_properties;
> + klass->props = s390_virtio_scsi_properties;
> }
>
> static TypeInfo s390_virtio_scsi = {
> diff --git a/hw/sb16.c b/hw/sb16.c
> index c81455d..5e8ef6e 100644
> --- a/hw/sb16.c
> +++ b/hw/sb16.c
> @@ -1407,7 +1407,7 @@ static void sb16_class_initfn (ObjectClass *klass, void *data)
> ic->init = sb16_initfn;
> dc->desc = "Creative Sound Blaster 16";
> dc->vmsd =&vmstate_sb16;
> - dc->props = sb16_properties;
> + klass->props = sb16_properties;
> }
>
> static TypeInfo sb16_info = {
> diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
> index 7caf446..bd42e64 100644
> --- a/hw/scsi-bus.c
> +++ b/hw/scsi-bus.c
> @@ -1609,7 +1609,7 @@ static void scsi_device_class_init(ObjectClass *klass, void *data)
> k->init = scsi_qdev_init;
> k->unplug = qdev_simple_unplug_cb;
> k->exit = scsi_qdev_exit;
> - k->props = scsi_props;
> + klass->props = scsi_props;
> }
>
> static TypeInfo scsi_device_type_info = {
> diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
> index 045c764..0a28d5a 100644
> --- a/hw/scsi-disk.c
> +++ b/hw/scsi-disk.c
> @@ -1945,7 +1945,7 @@ static void scsi_hd_class_initfn(ObjectClass *klass, void *data)
> dc->fw_name = "disk";
> dc->desc = "virtual SCSI disk";
> dc->reset = scsi_disk_reset;
> - dc->props = scsi_hd_properties;
> + klass->props = scsi_hd_properties;
> dc->vmsd =&vmstate_scsi_disk_state;
> }
>
> @@ -1973,7 +1973,7 @@ static void scsi_cd_class_initfn(ObjectClass *klass, void *data)
> dc->fw_name = "disk";
> dc->desc = "virtual SCSI CD-ROM";
> dc->reset = scsi_disk_reset;
> - dc->props = scsi_cd_properties;
> + klass->props = scsi_cd_properties;
> dc->vmsd =&vmstate_scsi_disk_state;
> }
>
> @@ -2001,7 +2001,7 @@ static void scsi_block_class_initfn(ObjectClass *klass, void *data)
> dc->fw_name = "disk";
> dc->desc = "SCSI block device passthrough";
> dc->reset = scsi_disk_reset;
> - dc->props = scsi_block_properties;
> + klass->props = scsi_block_properties;
> dc->vmsd =&vmstate_scsi_disk_state;
> }
>
> @@ -2034,7 +2034,7 @@ static void scsi_disk_class_initfn(ObjectClass *klass, void *data)
> dc->fw_name = "disk";
> dc->desc = "virtual SCSI disk or CD-ROM (legacy)";
> dc->reset = scsi_disk_reset;
> - dc->props = scsi_disk_properties;
> + klass->props = scsi_disk_properties;
> dc->vmsd =&vmstate_scsi_disk_state;
> }
>
> diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
> index d856d23..c3a50a3 100644
> --- a/hw/scsi-generic.c
> +++ b/hw/scsi-generic.c
> @@ -497,7 +497,7 @@ static void scsi_generic_class_initfn(ObjectClass *klass, void *data)
> dc->fw_name = "disk";
> dc->desc = "pass through generic scsi device (/dev/sg*)";
> dc->reset = scsi_generic_reset;
> - dc->props = scsi_generic_properties;
> + klass->props = scsi_generic_properties;
> dc->vmsd =&vmstate_scsi_device;
> }
>
> diff --git a/hw/serial.c b/hw/serial.c
> index a421d1e..1a76e91 100644
> --- a/hw/serial.c
> +++ b/hw/serial.c
> @@ -902,7 +902,7 @@ static void serial_isa_class_initfn(ObjectClass *klass, void *data)
> ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
> ic->init = serial_isa_initfn;
> dc->vmsd =&vmstate_isa_serial;
> - dc->props = serial_isa_properties;
> + klass->props = serial_isa_properties;
> }
>
> static TypeInfo serial_isa_info = {
> diff --git a/hw/slavio_timer.c b/hw/slavio_timer.c
> index 97edebb..62ceece 100644
> --- a/hw/slavio_timer.c
> +++ b/hw/slavio_timer.c
> @@ -417,7 +417,7 @@ static void slavio_timer_class_init(ObjectClass *klass, void *data)
> k->init = slavio_timer_init1;
> dc->reset = slavio_timer_reset;
> dc->vmsd =&vmstate_slavio_timer;
> - dc->props = slavio_timer_properties;
> + klass->props = slavio_timer_properties;
> }
>
> static TypeInfo slavio_timer_info = {
> diff --git a/hw/smbus_eeprom.c b/hw/smbus_eeprom.c
> index 11adab0..47e8a8a 100644
> --- a/hw/smbus_eeprom.c
> +++ b/hw/smbus_eeprom.c
> @@ -111,7 +111,6 @@ static Property smbus_eeprom_properties[] = {
>
> static void smbus_eeprom_class_initfn(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SMBusDeviceClass *sc = SMBUS_DEVICE_CLASS(klass);
>
> sc->init = smbus_eeprom_initfn;
> @@ -120,7 +119,7 @@ static void smbus_eeprom_class_initfn(ObjectClass *klass, void *data)
> sc->receive_byte = eeprom_receive_byte;
> sc->write_data = eeprom_write_data;
> sc->read_data = eeprom_read_data;
> - dc->props = smbus_eeprom_properties;
> + klass->props = smbus_eeprom_properties;
> }
>
> static TypeInfo smbus_eeprom_info = {
> diff --git a/hw/smc91c111.c b/hw/smc91c111.c
> index 1a5213f..20a15ce 100644
> --- a/hw/smc91c111.c
> +++ b/hw/smc91c111.c
> @@ -771,7 +771,7 @@ static void smc91c111_class_init(ObjectClass *klass, void *data)
> k->init = smc91c111_init1;
> dc->reset = smc91c111_reset;
> dc->vmsd =&vmstate_smc91c111;
> - dc->props = smc91c111_properties;
> + klass->props = smc91c111_properties;
> }
>
> static TypeInfo smc91c111_info = {
> diff --git a/hw/spapr_llan.c b/hw/spapr_llan.c
> index 8313043..185fae5 100644
> --- a/hw/spapr_llan.c
> +++ b/hw/spapr_llan.c
> @@ -486,7 +486,6 @@ static Property spapr_vlan_properties[] = {
>
> static void spapr_vlan_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> VIOsPAPRDeviceClass *k = VIO_SPAPR_DEVICE_CLASS(klass);
>
> k->init = spapr_vlan_init;
> @@ -496,7 +495,7 @@ static void spapr_vlan_class_init(ObjectClass *klass, void *data)
> k->dt_type = "network";
> k->dt_compatible = "IBM,l-lan";
> k->signal_mask = 0x1;
> - dc->props = spapr_vlan_properties;
> + klass->props = spapr_vlan_properties;
> }
>
> static TypeInfo spapr_vlan_info = {
> diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c
> index 97d417a..9e6525e 100644
> --- a/hw/spapr_pci.c
> +++ b/hw/spapr_pci.c
> @@ -344,10 +344,9 @@ static Property spapr_phb_properties[] = {
> static void spapr_phb_class_init(ObjectClass *klass, void *data)
> {
> SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
> - DeviceClass *dc = DEVICE_CLASS(klass);
>
> sdc->init = spapr_phb_init;
> - dc->props = spapr_phb_properties;
> + klass->props = spapr_phb_properties;
>
> spapr_rtas_register("read-pci-config", rtas_read_pci_config);
> spapr_rtas_register("write-pci-config", rtas_write_pci_config);
> diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c
> index c8271c6..781f386 100644
> --- a/hw/spapr_vio.c
> +++ b/hw/spapr_vio.c
> @@ -797,7 +797,7 @@ static void vio_spapr_device_class_init(ObjectClass *klass, void *data)
> k->init = spapr_vio_busdev_init;
> k->reset = spapr_vio_busdev_reset;
> k->bus_type = TYPE_SPAPR_VIO_BUS;
> - k->props = spapr_vio_props;
> + klass->props = spapr_vio_props;
> }
>
> static TypeInfo spapr_vio_type_info = {
> diff --git a/hw/spapr_vscsi.c b/hw/spapr_vscsi.c
> index 037867a..a3adec7 100644
> --- a/hw/spapr_vscsi.c
> +++ b/hw/spapr_vscsi.c
> @@ -951,7 +951,6 @@ static Property spapr_vscsi_properties[] = {
>
> static void spapr_vscsi_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> VIOsPAPRDeviceClass *k = VIO_SPAPR_DEVICE_CLASS(klass);
>
> k->init = spapr_vscsi_init;
> @@ -961,7 +960,7 @@ static void spapr_vscsi_class_init(ObjectClass *klass, void *data)
> k->dt_type = "vscsi";
> k->dt_compatible = "IBM,v-scsi";
> k->signal_mask = 0x00000001;
> - dc->props = spapr_vscsi_properties;
> + klass->props = spapr_vscsi_properties;
> }
>
> static TypeInfo spapr_vscsi_info = {
> diff --git a/hw/spapr_vty.c b/hw/spapr_vty.c
> index f340b83..4d16622 100644
> --- a/hw/spapr_vty.c
> +++ b/hw/spapr_vty.c
> @@ -140,14 +140,13 @@ static Property spapr_vty_properties[] = {
>
> static void spapr_vty_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> VIOsPAPRDeviceClass *k = VIO_SPAPR_DEVICE_CLASS(klass);
>
> k->init = spapr_vty_init;
> k->dt_name = "vty";
> k->dt_type = "serial";
> k->dt_compatible = "hvterm1";
> - dc->props = spapr_vty_properties;
> + klass->props = spapr_vty_properties;
> }
>
> static TypeInfo spapr_vty_info = {
> diff --git a/hw/sparc32_dma.c b/hw/sparc32_dma.c
> index 1dbf69e..95b8a61 100644
> --- a/hw/sparc32_dma.c
> +++ b/hw/sparc32_dma.c
> @@ -297,7 +297,7 @@ static void sparc32_dma_class_init(ObjectClass *klass, void *data)
> k->init = sparc32_dma_init1;
> dc->reset = dma_reset;
> dc->vmsd =&vmstate_dma;
> - dc->props = sparc32_dma_properties;
> + klass->props = sparc32_dma_properties;
> }
>
> static TypeInfo sparc32_dma_info = {
> diff --git a/hw/spitz.c b/hw/spitz.c
> index 20e7835..e257b78 100644
> --- a/hw/spitz.c
> +++ b/hw/spitz.c
> @@ -1036,7 +1036,7 @@ static void sl_nand_class_init(ObjectClass *klass, void *data)
>
> k->init = sl_nand_init;
> dc->vmsd =&vmstate_sl_nand_info;
> - dc->props = sl_nand_properties;
> + klass->props = sl_nand_properties;
> }
>
> static TypeInfo sl_nand_info = {
> @@ -1071,7 +1071,7 @@ static void spitz_keyboard_class_init(ObjectClass *klass, void *data)
>
> k->init = spitz_keyboard_init;
> dc->vmsd =&vmstate_spitz_kbd;
> - dc->props = spitz_keyboard_properties;
> + klass->props = spitz_keyboard_properties;
> }
>
> static TypeInfo spitz_keyboard_info = {
> diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c
> index fbe99cb..6ef99c0 100644
> --- a/hw/stellaris_enet.c
> +++ b/hw/stellaris_enet.c
> @@ -427,11 +427,10 @@ static Property stellaris_enet_properties[] = {
>
> static void stellaris_enet_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = stellaris_enet_init;
> - dc->props = stellaris_enet_properties;
> + klass->props = stellaris_enet_properties;
> }
>
> static TypeInfo stellaris_enet_info = {
> diff --git a/hw/strongarm.c b/hw/strongarm.c
> index 7150eeb..887c46d 100644
> --- a/hw/strongarm.c
> +++ b/hw/strongarm.c
> @@ -1295,7 +1295,7 @@ static void strongarm_uart_class_init(ObjectClass *klass, void *data)
> dc->desc = "StrongARM UART controller";
> dc->reset = strongarm_uart_reset;
> dc->vmsd =&vmstate_strongarm_uart_regs;
> - dc->props = strongarm_uart_properties;
> + klass->props = strongarm_uart_properties;
> }
>
> static TypeInfo strongarm_uart_info = {
> diff --git a/hw/sun4m.c b/hw/sun4m.c
> index a959261..11c43f3 100644
> --- a/hw/sun4m.c
> +++ b/hw/sun4m.c
> @@ -730,11 +730,10 @@ static Property prom_properties[] = {
>
> static void prom_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = prom_init1;
> - dc->props = prom_properties;
> + klass->props = prom_properties;
> }
>
> static TypeInfo prom_info = {
> @@ -794,11 +793,10 @@ static Property ram_properties[] = {
>
> static void ram_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = ram_init1;
> - dc->props = ram_properties;
> + klass->props = ram_properties;
> }
>
> static TypeInfo ram_info = {
> diff --git a/hw/sun4m_iommu.c b/hw/sun4m_iommu.c
> index ebefa91..485eee3 100644
> --- a/hw/sun4m_iommu.c
> +++ b/hw/sun4m_iommu.c
> @@ -370,7 +370,7 @@ static void iommu_class_init(ObjectClass *klass, void *data)
> k->init = iommu_init1;
> dc->reset = iommu_reset;
> dc->vmsd =&vmstate_iommu;
> - dc->props = iommu_properties;
> + klass->props = iommu_properties;
> }
>
> static TypeInfo iommu_info = {
> diff --git a/hw/sun4u.c b/hw/sun4u.c
> index 137a7c6..db3c9a4 100644
> --- a/hw/sun4u.c
> +++ b/hw/sun4u.c
> @@ -681,11 +681,10 @@ static Property prom_properties[] = {
>
> static void prom_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = prom_init1;
> - dc->props = prom_properties;
> + klass->props = prom_properties;
> }
>
> static TypeInfo prom_info = {
> @@ -738,11 +737,10 @@ static Property ram_properties[] = {
>
> static void ram_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = ram_init1;
> - dc->props = ram_properties;
> + klass->props = ram_properties;
> }
>
> static TypeInfo ram_info = {
> diff --git a/hw/tcx.c b/hw/tcx.c
> index ac7dcb4..5b64296 100644
> --- a/hw/tcx.c
> +++ b/hw/tcx.c
> @@ -654,7 +654,7 @@ static void tcx_class_init(ObjectClass *klass, void *data)
> k->init = tcx_init1;
> dc->reset = tcx_reset;
> dc->vmsd =&vmstate_tcx;
> - dc->props = tcx_properties;
> + klass->props = tcx_properties;
> }
>
> static TypeInfo tcx_info = {
> diff --git a/hw/usb/bus.c b/hw/usb/bus.c
> index f87cc5f..8c51fc3 100644
> --- a/hw/usb/bus.c
> +++ b/hw/usb/bus.c
> @@ -589,7 +589,7 @@ static void usb_device_class_init(ObjectClass *klass, void *data)
> k->init = usb_qdev_init;
> k->unplug = qdev_simple_unplug_cb;
> k->exit = usb_qdev_exit;
> - k->props = usb_props;
> + klass->props = usb_props;
> }
>
> static TypeInfo usb_device_type_info = {
> diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c
> index 79b75fb..acafc4c 100644
> --- a/hw/usb/dev-audio.c
> +++ b/hw/usb/dev-audio.c
> @@ -688,7 +688,7 @@ static void usb_audio_class_init(ObjectClass *klass, void *data)
> USBDeviceClass *k = USB_DEVICE_CLASS(klass);
>
> dc->vmsd =&vmstate_usb_audio;
> - dc->props = usb_audio_properties;
> + klass->props = usb_audio_properties;
> k->product_desc = "QEMU USB Audio Interface";
> k->usb_desc =&desc_audio;
> k->init = usb_audio_initfn;
> diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c
> index 5d2f098..e707b2b 100644
> --- a/hw/usb/dev-network.c
> +++ b/hw/usb/dev-network.c
> @@ -1408,7 +1408,7 @@ static void usb_net_class_initfn(ObjectClass *klass, void *data)
> uc->handle_destroy = usb_net_handle_destroy;
> dc->fw_name = "network";
> dc->vmsd =&vmstate_usb_net;
> - dc->props = net_properties;
> + klass->props = net_properties;
> }
>
> static TypeInfo net_info = {
> diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
> index 56743ee..1f7d0a6 100644
> --- a/hw/usb/dev-serial.c
> +++ b/hw/usb/dev-serial.c
> @@ -589,7 +589,7 @@ static void usb_serial_class_initfn(ObjectClass *klass, void *data)
> uc->handle_data = usb_serial_handle_data;
> uc->handle_destroy = usb_serial_handle_destroy;
> dc->vmsd =&vmstate_usb_serial;
> - dc->props = serial_properties;
> + klass->props = serial_properties;
> }
>
> static TypeInfo serial_info = {
> @@ -617,7 +617,7 @@ static void usb_braille_class_initfn(ObjectClass *klass, void *data)
> uc->handle_data = usb_serial_handle_data;
> uc->handle_destroy = usb_serial_handle_destroy;
> dc->vmsd =&vmstate_usb_serial;
> - dc->props = braille_properties;
> + klass->props = braille_properties;
> }
>
> static TypeInfo braille_info = {
> diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
> index 6cf4a1a..921ddd7 100644
> --- a/hw/usb/dev-smartcard-reader.c
> +++ b/hw/usb/dev-smartcard-reader.c
> @@ -1334,7 +1334,7 @@ static void ccid_class_initfn(ObjectClass *klass, void *data)
> uc->handle_destroy = ccid_handle_destroy;
> dc->desc = "CCID Rev 1.1 smartcard reader";
> dc->vmsd =&ccid_vmstate;
> - dc->props = ccid_properties;
> + klass->props = ccid_properties;
> }
>
> static TypeInfo ccid_info = {
> @@ -1350,7 +1350,7 @@ static void ccid_card_class_init(ObjectClass *klass, void *data)
> k->bus_type = TYPE_CCID_BUS;
> k->init = ccid_card_init;
> k->exit = ccid_card_exit;
> - k->props = ccid_props;
> + klass->props = ccid_props;
> }
>
> static TypeInfo ccid_card_type_info = {
> diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
> index a96c0b9..dc3aa74 100644
> --- a/hw/usb/dev-storage.c
> +++ b/hw/usb/dev-storage.c
> @@ -662,7 +662,7 @@ static void usb_msd_class_initfn(ObjectClass *klass, void *data)
> uc->handle_data = usb_msd_handle_data;
> dc->fw_name = "storage";
> dc->vmsd =&vmstate_usb_msd;
> - dc->props = msd_properties;
> + klass->props = msd_properties;
> }
>
> static TypeInfo msd_info = {
> diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
> index e759c99..6a22602 100644
> --- a/hw/usb/hcd-ehci.c
> +++ b/hw/usb/hcd-ehci.c
> @@ -2208,7 +2208,7 @@ static void ehci_class_init(ObjectClass *klass, void *data)
> k->revision = 0x10;
> k->class_id = PCI_CLASS_SERIAL_USB;
> dc->vmsd =&vmstate_ehci;
> - dc->props = ehci_properties;
> + klass->props = ehci_properties;
> }
>
> static TypeInfo ehci_info = {
> @@ -2229,7 +2229,7 @@ static void ich9_ehci_class_init(ObjectClass *klass, void *data)
> k->revision = 0x03;
> k->class_id = PCI_CLASS_SERIAL_USB;
> dc->vmsd =&vmstate_ehci;
> - dc->props = ehci_properties;
> + klass->props = ehci_properties;
> }
>
> static TypeInfo ich9_ehci_info = {
> diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
> index 1a1cc88..b547381 100644
> --- a/hw/usb/hcd-ohci.c
> +++ b/hw/usb/hcd-ohci.c
> @@ -1863,7 +1863,7 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data)
> k->device_id = PCI_DEVICE_ID_APPLE_IPID_USB;
> k->class_id = PCI_CLASS_SERIAL_USB;
> dc->desc = "Apple USB Controller";
> - dc->props = ohci_pci_properties;
> + klass->props = ohci_pci_properties;
> }
>
> static TypeInfo ohci_pci_info = {
> @@ -1886,7 +1886,7 @@ static void ohci_sysbus_class_init(ObjectClass *klass, void *data)
>
> sbc->init = ohci_init_pxa;
> dc->desc = "OHCI USB Controller";
> - dc->props = ohci_sysbus_properties;
> + klass->props = ohci_sysbus_properties;
> }
>
> static TypeInfo ohci_sysbus_info = {
> diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
> index 9e211a0..5b96645 100644
> --- a/hw/usb/hcd-uhci.c
> +++ b/hw/usb/hcd-uhci.c
> @@ -1259,7 +1259,7 @@ static void piix3_uhci_class_init(ObjectClass *klass, void *data)
> k->revision = 0x01;
> k->class_id = PCI_CLASS_SERIAL_USB;
> dc->vmsd =&vmstate_uhci;
> - dc->props = uhci_properties;
> + klass->props = uhci_properties;
> }
>
> static TypeInfo piix3_uhci_info = {
> @@ -1281,7 +1281,7 @@ static void piix4_uhci_class_init(ObjectClass *klass, void *data)
> k->revision = 0x01;
> k->class_id = PCI_CLASS_SERIAL_USB;
> dc->vmsd =&vmstate_uhci;
> - dc->props = uhci_properties;
> + klass->props = uhci_properties;
> }
>
> static TypeInfo piix4_uhci_info = {
> @@ -1303,7 +1303,7 @@ static void vt82c686b_uhci_class_init(ObjectClass *klass, void *data)
> k->revision = 0x01;
> k->class_id = PCI_CLASS_SERIAL_USB;
> dc->vmsd =&vmstate_uhci;
> - dc->props = uhci_properties;
> + klass->props = uhci_properties;
> }
>
> static TypeInfo vt82c686b_uhci_info = {
> @@ -1324,7 +1324,7 @@ static void ich9_uhci1_class_init(ObjectClass *klass, void *data)
> k->revision = 0x03;
> k->class_id = PCI_CLASS_SERIAL_USB;
> dc->vmsd =&vmstate_uhci;
> - dc->props = uhci_properties;
> + klass->props = uhci_properties;
> }
>
> static TypeInfo ich9_uhci1_info = {
> @@ -1345,7 +1345,7 @@ static void ich9_uhci2_class_init(ObjectClass *klass, void *data)
> k->revision = 0x03;
> k->class_id = PCI_CLASS_SERIAL_USB;
> dc->vmsd =&vmstate_uhci;
> - dc->props = uhci_properties;
> + klass->props = uhci_properties;
> }
>
> static TypeInfo ich9_uhci2_info = {
> @@ -1366,7 +1366,7 @@ static void ich9_uhci3_class_init(ObjectClass *klass, void *data)
> k->revision = 0x03;
> k->class_id = PCI_CLASS_SERIAL_USB;
> dc->vmsd =&vmstate_uhci;
> - dc->props = uhci_properties;
> + klass->props = uhci_properties;
> }
>
> static TypeInfo ich9_uhci3_info = {
> diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
> index 5cf1a64..67dcd53 100644
> --- a/hw/usb/hcd-xhci.c
> +++ b/hw/usb/hcd-xhci.c
> @@ -2894,7 +2894,7 @@ static void xhci_class_init(ObjectClass *klass, void *data)
> DeviceClass *dc = DEVICE_CLASS(klass);
>
> dc->vmsd =&vmstate_xhci;
> - dc->props = xhci_properties;
> + klass->props = xhci_properties;
> k->init = usb_xhci_initfn;
> k->vendor_id = PCI_VENDOR_ID_NEC;
> k->device_id = PCI_DEVICE_ID_NEC_UPD720200;
> diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c
> index a95b0ed..548e207 100644
> --- a/hw/usb/host-linux.c
> +++ b/hw/usb/host-linux.c
> @@ -1472,7 +1472,7 @@ static void usb_host_class_initfn(ObjectClass *klass, void *data)
> uc->handle_reset = usb_host_handle_reset;
> uc->handle_destroy = usb_host_handle_destroy;
> dc->vmsd =&vmstate_usb_host;
> - dc->props = usb_host_dev_properties;
> + klass->props = usb_host_dev_properties;
> }
>
> static TypeInfo usb_host_dev_info = {
> diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
> index 51c27b4..3cdd28a 100644
> --- a/hw/usb/redirect.c
> +++ b/hw/usb/redirect.c
> @@ -1479,7 +1479,7 @@ static void usbredir_class_initfn(ObjectClass *klass, void *data)
> uc->handle_reset = usbredir_handle_reset;
> uc->handle_data = usbredir_handle_data;
> uc->handle_control = usbredir_handle_control;
> - dc->props = usbredir_properties;
> + klass->props = usbredir_properties;
> }
>
> static TypeInfo usbredir_dev_info = {
> diff --git a/hw/virtio-console.c b/hw/virtio-console.c
> index cffee3d..212544a 100644
> --- a/hw/virtio-console.c
> +++ b/hw/virtio-console.c
> @@ -131,7 +131,6 @@ static Property virtconsole_properties[] = {
>
> static void virtconsole_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> VirtIOSerialPortClass *k = VIRTIO_SERIAL_PORT_CLASS(klass);
>
> k->is_console = true;
> @@ -139,7 +138,7 @@ static void virtconsole_class_init(ObjectClass *klass, void *data)
> k->have_data = flush_buf;
> k->guest_open = guest_open;
> k->guest_close = guest_close;
> - dc->props = virtconsole_properties;
> + klass->props = virtconsole_properties;
> }
>
> static TypeInfo virtconsole_info = {
> @@ -156,14 +155,13 @@ static Property virtserialport_properties[] = {
>
> static void virtserialport_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> VirtIOSerialPortClass *k = VIRTIO_SERIAL_PORT_CLASS(klass);
>
> k->init = virtconsole_initfn;
> k->have_data = flush_buf;
> k->guest_open = guest_open;
> k->guest_close = guest_close;
> - dc->props = virtserialport_properties;
> + klass->props = virtserialport_properties;
> }
>
> static TypeInfo virtserialport_info = {
> diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
> index d08c159..871e756 100644
> --- a/hw/virtio-pci.c
> +++ b/hw/virtio-pci.c
> @@ -961,7 +961,7 @@ static void virtio_blk_class_init(ObjectClass *klass, void *data)
> k->revision = VIRTIO_PCI_ABI_VERSION;
> k->class_id = PCI_CLASS_STORAGE_SCSI;
> dc->reset = virtio_pci_reset;
> - dc->props = virtio_blk_properties;
> + klass->props = virtio_blk_properties;
> }
>
> static TypeInfo virtio_blk_info = {
> @@ -995,7 +995,7 @@ static void virtio_net_class_init(ObjectClass *klass, void *data)
> k->revision = VIRTIO_PCI_ABI_VERSION;
> k->class_id = PCI_CLASS_NETWORK_ETHERNET;
> dc->reset = virtio_pci_reset;
> - dc->props = virtio_net_properties;
> + klass->props = virtio_net_properties;
> }
>
> static TypeInfo virtio_net_info = {
> @@ -1026,7 +1026,7 @@ static void virtio_serial_class_init(ObjectClass *klass, void *data)
> k->revision = VIRTIO_PCI_ABI_VERSION;
> k->class_id = PCI_CLASS_COMMUNICATION_OTHER;
> dc->reset = virtio_pci_reset;
> - dc->props = virtio_serial_properties;
> + klass->props = virtio_serial_properties;
> }
>
> static TypeInfo virtio_serial_info = {
> @@ -1054,7 +1054,7 @@ static void virtio_balloon_class_init(ObjectClass *klass, void *data)
> k->revision = VIRTIO_PCI_ABI_VERSION;
> k->class_id = PCI_CLASS_OTHERS;
> dc->reset = virtio_pci_reset;
> - dc->props = virtio_balloon_properties;
> + klass->props = virtio_balloon_properties;
> }
>
> static TypeInfo virtio_balloon_info = {
> @@ -1108,7 +1108,7 @@ static void virtio_scsi_class_init(ObjectClass *klass, void *data)
> k->revision = 0x00;
> k->class_id = PCI_CLASS_STORAGE_SCSI;
> dc->reset = virtio_pci_reset;
> - dc->props = virtio_scsi_properties;
> + klass->props = virtio_scsi_properties;
> }
>
> static TypeInfo virtio_scsi_info = {
> diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
> index 96382a4..2636fdd 100644
> --- a/hw/virtio-serial-bus.c
> +++ b/hw/virtio-serial-bus.c
> @@ -995,7 +995,7 @@ static void virtio_serial_port_class_init(ObjectClass *klass, void *data)
> k->bus_type = TYPE_VIRTIO_SERIAL_BUS;
> k->exit = virtser_port_qdev_exit;
> k->unplug = qdev_simple_unplug_cb;
> - k->props = virtser_props;
> + klass->props = virtser_props;
> }
>
> static TypeInfo virtio_serial_port_type_info = {
> diff --git a/hw/vmmouse.c b/hw/vmmouse.c
> index 6338efa..0fb7064 100644
> --- a/hw/vmmouse.c
> +++ b/hw/vmmouse.c
> @@ -284,7 +284,7 @@ static void vmmouse_class_initfn(ObjectClass *klass, void *data)
> dc->no_user = 1;
> dc->reset = vmmouse_reset;
> dc->vmsd =&vmstate_vmmouse;
> - dc->props = vmmouse_properties;
> + klass->props = vmmouse_properties;
> }
>
> static TypeInfo vmmouse_info = {
> diff --git a/hw/vt82c686.c b/hw/vt82c686.c
> index 6fb7950..59d1f0f 100644
> --- a/hw/vt82c686.c
> +++ b/hw/vt82c686.c
> @@ -471,7 +471,7 @@ static void via_pm_class_init(ObjectClass *klass, void *data)
> k->revision = 0x40;
> dc->desc = "PM";
> dc->vmsd =&vmstate_acpi;
> - dc->props = via_pm_properties;
> + klass->props = via_pm_properties;
> }
>
> static TypeInfo via_pm_info = {
> diff --git a/hw/xgmac.c b/hw/xgmac.c
> index dd4bdc4..70ce403 100644
> --- a/hw/xgmac.c
> +++ b/hw/xgmac.c
> @@ -415,7 +415,7 @@ static void xgmac_enet_class_init(ObjectClass *klass, void *data)
>
> sbc->init = xgmac_enet_init;
> dc->vmsd =&vmstate_xgmac;
> - dc->props = xgmac_properties;
> + klass->props = xgmac_properties;
> }
>
> static TypeInfo xgmac_enet_info = {
> diff --git a/hw/xilinx_axidma.c b/hw/xilinx_axidma.c
> index 85dfcbf..710c2ca 100644
> --- a/hw/xilinx_axidma.c
> +++ b/hw/xilinx_axidma.c
> @@ -494,11 +494,10 @@ static Property axidma_properties[] = {
>
> static void axidma_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = xilinx_axidma_init;
> - dc->props = axidma_properties;
> + klass->props = axidma_properties;
> }
>
> static TypeInfo axidma_info = {
> diff --git a/hw/xilinx_axienet.c b/hw/xilinx_axienet.c
> index 7526273..326ce0c 100644
> --- a/hw/xilinx_axienet.c
> +++ b/hw/xilinx_axienet.c
> @@ -881,11 +881,10 @@ static Property xilinx_enet_properties[] = {
>
> static void xilinx_enet_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = xilinx_enet_init;
> - dc->props = xilinx_enet_properties;
> + klass->props = xilinx_enet_properties;
> }
>
> static TypeInfo xilinx_enet_info = {
> diff --git a/hw/xilinx_ethlite.c b/hw/xilinx_ethlite.c
> index 857b33d..7164891 100644
> --- a/hw/xilinx_ethlite.c
> +++ b/hw/xilinx_ethlite.c
> @@ -235,11 +235,10 @@ static Property xilinx_ethlite_properties[] = {
>
> static void xilinx_ethlite_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = xilinx_ethlite_init;
> - dc->props = xilinx_ethlite_properties;
> + klass->props = xilinx_ethlite_properties;
> }
>
> static TypeInfo xilinx_ethlite_info = {
> diff --git a/hw/xilinx_intc.c b/hw/xilinx_intc.c
> index 553f848..8acda8f 100644
> --- a/hw/xilinx_intc.c
> +++ b/hw/xilinx_intc.c
> @@ -168,11 +168,10 @@ static Property xilinx_intc_properties[] = {
>
> static void xilinx_intc_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = xilinx_intc_init;
> - dc->props = xilinx_intc_properties;
> + klass->props = xilinx_intc_properties;
> }
>
> static TypeInfo xilinx_intc_info = {
> diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c
> index 3ab2f2b..2e441b4 100644
> --- a/hw/xilinx_timer.c
> +++ b/hw/xilinx_timer.c
> @@ -227,11 +227,10 @@ static Property xilinx_timer_properties[] = {
>
> static void xilinx_timer_class_init(ObjectClass *klass, void *data)
> {
> - DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> k->init = xilinx_timer_init;
> - dc->props = xilinx_timer_properties;
> + klass->props = xilinx_timer_properties;
> }
>
> static TypeInfo xilinx_timer_info = {
> diff --git a/hw/xio3130_downstream.c b/hw/xio3130_downstream.c
> index 319624f..6528af0 100644
> --- a/hw/xio3130_downstream.c
> +++ b/hw/xio3130_downstream.c
> @@ -193,7 +193,7 @@ static void xio3130_downstream_class_init(ObjectClass *klass, void *data)
> dc->desc = "TI X3130 Downstream Port of PCI Express Switch";
> dc->reset = xio3130_downstream_reset;
> dc->vmsd =&vmstate_xio3130_downstream;
> - dc->props = xio3130_downstream_properties;
> + klass->props = xio3130_downstream_properties;
> }
>
> static TypeInfo xio3130_downstream_info = {
> diff --git a/hw/xio3130_upstream.c b/hw/xio3130_upstream.c
> index 34a99bb..4ff5e4c 100644
> --- a/hw/xio3130_upstream.c
> +++ b/hw/xio3130_upstream.c
> @@ -167,7 +167,7 @@ static void xio3130_upstream_class_init(ObjectClass *klass, void *data)
> dc->desc = "TI X3130 Upstream Port of PCI Express Switch";
> dc->reset = xio3130_upstream_reset;
> dc->vmsd =&vmstate_xio3130_upstream;
> - dc->props = xio3130_upstream_properties;
> + klass->props = xio3130_upstream_properties;
> }
>
> static TypeInfo xio3130_upstream_info = {
> diff --git a/hw/zaurus.c b/hw/zaurus.c
> index 72838ec..4aca57c 100644
> --- a/hw/zaurus.c
> +++ b/hw/zaurus.c
> @@ -233,7 +233,7 @@ static void scoop_sysbus_class_init(ObjectClass *klass, void *data)
> k->init = scoop_init;
> dc->desc = "Scoop2 Sharp custom ASIC";
> dc->vmsd =&vmstate_scoop_regs;
> - dc->props = scoop_sysbus_properties;
> + klass->props = scoop_sysbus_properties;
> }
>
> static TypeInfo scoop_sysbus_info = {
> diff --git a/include/qemu/object.h b/include/qemu/object.h
> index ea5f16e..4ea1187 100644
> --- a/include/qemu/object.h
> +++ b/include/qemu/object.h
> @@ -33,6 +33,9 @@ typedef struct TypeInfo TypeInfo;
> typedef struct InterfaceClass InterfaceClass;
> typedef struct InterfaceInfo InterfaceInfo;
>
> +typedef struct Property Property;
> +typedef struct PropertyInfo PropertyInfo;
> +
> #define TYPE_OBJECT "object"
>
> /**
> @@ -241,6 +244,7 @@ struct ObjectClass
> Type type;
>
> /*< public>*/
> + Property *props;
> const char *(*get_id)(Object *);
> };
>
> @@ -983,9 +987,6 @@ int object_child_foreach(Object *obj, int (*fn)(Object *child, void *opaque),
> */
> Object *container_get(Object *root, const char *path);
>
> -typedef struct Property Property;
> -typedef struct PropertyInfo PropertyInfo;
> -
> struct Property {
> const char *name;
> PropertyInfo *info;
> diff --git a/qom/object.c b/qom/object.c
> index 02464e1..a639348 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -1262,9 +1262,28 @@ bool object_is_realized(Object *obj)
> return obj->state == OBJECT_STATE_REALIZED;
> }
>
> +static void object_class_base_init(ObjectClass *klass, void *data)
> +{
> + /* We explicitly look up properties in the superclasses,
> + * so do not propagate them to the subclasses.
> + */
> + klass->props = NULL;
> +}
> +
> static void object_instance_init(Object *obj)
> {
> + ObjectClass *class;
> + Property *prop;
> +
> object_property_add_str(obj, "type", qdev_get_type, NULL, NULL);
> +
> + class = object_get_class(obj);
> + do {
> + for (prop = OBJECT_CLASS(class)->props; prop&& prop->name; prop++) {
> + object_property_add_static(obj, prop, NULL);
> + }
> + class = object_class_get_parent(class);
> + } while (class != object_class_by_name(TYPE_OBJECT));
> }
>
> static void object_class_init(ObjectClass *klass, void *class_data)
> @@ -1283,6 +1302,7 @@ static void register_types(void)
> static TypeInfo object_info = {
> .name = TYPE_OBJECT,
> .instance_size = sizeof(Object),
> + .class_base_init = object_class_base_init,
> .instance_init = object_instance_init,
> .class_init = object_class_init,
> .abstract = true,
next prev parent reply other threads:[~2012-06-08 1:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 19:30 [Qemu-devel] [PATCH qom-next 0/7] QOM realize, revised Andreas Färber
2012-06-07 19:30 ` [Qemu-devel] [PATCH qom-next 1/7] qdev: Push state up to Object Andreas Färber
2012-06-08 1:19 ` Anthony Liguori
2012-06-10 15:49 ` Paolo Bonzini
2012-06-10 17:35 ` Anthony Liguori
2012-06-10 17:38 ` Andreas Färber
2012-06-11 8:25 ` Kevin Wolf
2012-06-11 13:21 ` Anthony Liguori
2012-06-11 14:38 ` Kevin Wolf
2012-06-11 21:31 ` Andreas Färber
2012-06-11 21:43 ` Andreas Färber
2012-06-11 21:48 ` Anthony Liguori
2012-06-12 0:14 ` Andreas Färber
2012-06-07 19:31 ` [Qemu-devel] [PATCH qom-next 2/7] qom: Add get_id Andreas Färber
2012-06-08 1:22 ` Anthony Liguori
2012-06-08 7:11 ` Andreas Färber
2012-06-08 7:44 ` Anthony Liguori
2012-06-08 8:17 ` Andreas Färber
2012-06-08 10:59 ` [Qemu-devel] [libvirt] " Daniel P. Berrange
2012-06-08 11:58 ` [Qemu-devel] " Eric Blake
2012-06-07 19:31 ` [Qemu-devel] [PATCH qom-next 3/7] qdev: Generalize properties to Objects Andreas Färber
2012-06-08 1:23 ` Anthony Liguori
2012-06-07 19:31 ` [Qemu-devel] [PATCH qom-next 4/7] qdev: Move bulk of qdev-properties.c to qom/object-properties.c Andreas Färber
2012-06-07 23:23 ` Paolo Bonzini
2012-06-08 1:26 ` Anthony Liguori
2012-06-07 19:31 ` [Qemu-devel] [PATCH qom-next 5/7] qom: Push static properties to Object Andreas Färber
2012-06-08 1:26 ` Anthony Liguori [this message]
2012-06-07 19:31 ` [Qemu-devel] [PATCH qom-next 6/7] qom: Add "realized" property Andreas Färber
2012-06-08 1:26 ` Anthony Liguori
2012-06-07 19:31 ` [Qemu-devel] [PATCH qom-next 7/7] qom: Add QERR_PROPERTY_SET_AFTER_REALIZE Andreas Färber
2012-06-07 19:56 ` Andreas Färber
2012-06-07 23:22 ` [Qemu-devel] [PATCH qom-next 0/7] QOM realize, revised Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FD154CC.3020202@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=amit.shah@redhat.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=d.solodkiy@samsung.com \
--cc=e.voevodin@samsung.com \
--cc=i.mitsyanko@samsung.com \
--cc=jan.kiszka@web.de \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=m.kozlov@samsung.com \
--cc=mark.langsdorf@calxeda.com \
--cc=mst@redhat.com \
--cc=paul@codesourcery.com \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@petalogix.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.