@@ -207,7 +207,7 @@ static void virtio_9p_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->props = virtio_9p_properties;
+ device_class_set_props(dc, virtio_9p_properties);
dc->vmsd = &vmstate_virtio_9p;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->realize = virtio_9p_device_realize;
@@ -687,7 +687,7 @@ static void piix4_pm_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_BRIDGE_OTHER;
dc->desc = "PM";
dc->vmsd = &vmstate_acpi;
- dc->props = piix4_pm_properties;
+ device_class_set_props(dc, piix4_pm_properties);
/*
* Reason: part of PIIX4 southbridge, needs to be wired up,
* e.g. by mips_malta_init()
@@ -245,7 +245,7 @@ static void bitband_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = bitband_properties;
+ device_class_set_props(dc, bitband_properties);
}
static const TypeInfo bitband_info = {
@@ -158,7 +158,7 @@ static void bcm2836_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
- dc->props = bcm2836_props;
+ device_class_set_props(dc, bcm2836_props);
dc->realize = bcm2836_realize;
/*
@@ -638,7 +638,7 @@ static void core_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = core_properties;
+ device_class_set_props(dc, core_properties);
dc->realize = integratorcm_realize;
}
@@ -427,7 +427,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;
+ device_class_set_props(dc, mv88w8618_eth_properties);
}
static const TypeInfo mv88w8618_eth_info = {
@@ -1530,7 +1530,7 @@ static void pxa2xx_i2c_class_init(ObjectClass *klass, void *data)
dc->desc = "PXA2xx I2C Bus Controller";
dc->vmsd = &vmstate_pxa2xx_i2c;
- dc->props = pxa2xx_i2c_properties;
+ device_class_set_props(dc, pxa2xx_i2c_properties);
}
static const TypeInfo pxa2xx_i2c_info = {
@@ -2014,7 +2014,7 @@ static void pxa2xx_fir_class_init(ObjectClass *klass, void *data)
dc->realize = pxa2xx_fir_realize;
dc->vmsd = &pxa2xx_fir_vmsd;
- dc->props = pxa2xx_fir_properties;
+ device_class_set_props(dc, pxa2xx_fir_properties);
dc->reset = pxa2xx_fir_reset;
}
@@ -340,7 +340,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;
+ device_class_set_props(dc, pxa2xx_gpio_properties);
dc->vmsd = &vmstate_pxa2xx_gpio_regs;
}
@@ -1060,7 +1060,7 @@ static void sl_nand_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &vmstate_sl_nand_info;
- dc->props = sl_nand_properties;
+ device_class_set_props(dc, sl_nand_properties);
/* Reason: init() method uses drive_get() */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -202,7 +202,7 @@ static void stm32f205_soc_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = stm32f205_soc_realize;
- dc->props = stm32f205_soc_properties;
+ device_class_set_props(dc, stm32f205_soc_properties);
}
static const TypeInfo stm32f205_soc_info = {
@@ -1319,7 +1319,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;
+ device_class_set_props(dc, strongarm_uart_properties);
}
static const TypeInfo strongarm_uart_info = {
@@ -435,7 +435,7 @@ static void xlnx_zynqmp_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
- dc->props = xlnx_zynqmp_props;
+ device_class_set_props(dc, xlnx_zynqmp_props);
dc->realize = xlnx_zynqmp_realize;
/*
@@ -1411,7 +1411,7 @@ static void ac97_class_init (ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Intel 82801AA AC97 Audio";
dc->vmsd = &vmstate_ac97;
- dc->props = ac97_properties;
+ device_class_set_props(dc, ac97_properties);
dc->reset = ac97_on_reset;
}
@@ -361,7 +361,7 @@ static void adlib_class_initfn (ObjectClass *klass, void *data)
dc->realize = adlib_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = ADLIB_DESC;
- dc->props = adlib_properties;
+ device_class_set_props(dc, adlib_properties);
}
static const TypeInfo adlib_info = {
@@ -166,7 +166,7 @@ static void cs4231_class_init(ObjectClass *klass, void *data)
dc->reset = cs_reset;
dc->vmsd = &vmstate_cs4231;
- dc->props = cs4231_properties;
+ device_class_set_props(dc, cs4231_properties);
}
static const TypeInfo cs4231_info = {
@@ -695,7 +695,7 @@ static void cs4231a_class_initfn (ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Crystal Semiconductor CS4231A";
dc->vmsd = &vmstate_cs4231a;
- dc->props = cs4231a_properties;
+ device_class_set_props(dc, cs4231a_properties);
}
static const TypeInfo cs4231a_info = {
@@ -305,7 +305,7 @@ static void gus_class_initfn (ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Gravis Ultrasound GF1";
dc->vmsd = &vmstate_gus;
- dc->props = gus_properties;
+ device_class_set_props(dc, gus_properties);
}
static const TypeInfo gus_info = {
@@ -663,7 +663,7 @@ static void hda_audio_base_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->reset = hda_audio_reset;
dc->vmsd = &vmstate_hda_audio;
- dc->props = hda_audio_properties;
+ device_class_set_props(dc, hda_audio_properties);
}
static const TypeInfo hda_audio_info = {
@@ -1268,7 +1268,7 @@ static void intel_hda_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_MULTIMEDIA_HD_AUDIO;
dc->reset = intel_hda_reset;
dc->vmsd = &vmstate_intel_hda;
- dc->props = intel_hda_properties;
+ device_class_set_props(dc, intel_hda_properties);
}
static void intel_hda_class_init_ich6(ObjectClass *klass, void *data)
@@ -1320,7 +1320,7 @@ static void hda_codec_device_class_init(ObjectClass *klass, void *data)
k->exit = hda_codec_dev_exit;
set_bit(DEVICE_CATEGORY_SOUND, k->categories);
k->bus_type = TYPE_HDA_BUS;
- k->props = hda_props;
+ device_class_set_props(k, hda_props);
}
static const TypeInfo hda_codec_device_type_info = {
@@ -287,7 +287,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;
+ device_class_set_props(dc, mv88w8618_audio_properties);
/* Reason: pointer property "wm8750" */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -211,7 +211,7 @@ static void pcspk_class_initfn(ObjectClass *klass, void *data)
dc->realize = pcspk_realizefn;
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->vmsd = &vmstate_spk;
- dc->props = pcspk_properties;
+ device_class_set_props(dc, pcspk_properties);
/* Reason: realize sets global pcspk_state */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -633,7 +633,7 @@ static void pl041_device_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->reset = pl041_device_reset;
dc->vmsd = &vmstate_pl041;
- dc->props = pl041_device_properties;
+ device_class_set_props(dc, pl041_device_properties);
}
static const TypeInfo pl041_device_info = {
@@ -1418,7 +1418,7 @@ static void sb16_class_initfn (ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
dc->desc = "Creative Sound Blaster 16";
dc->vmsd = &vmstate_sb16;
- dc->props = sb16_properties;
+ device_class_set_props(dc, sb16_properties);
}
static const TypeInfo sb16_info = {
@@ -2630,7 +2630,7 @@ static void isabus_fdc_class_init(ObjectClass *klass, void *data)
dc->fw_name = "fdc";
dc->reset = fdctrl_external_reset_isa;
dc->vmsd = &vmstate_isa_fdc;
- dc->props = isa_fdc_properties;
+ device_class_set_props(dc, isa_fdc_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -2683,7 +2683,7 @@ static void sysbus_fdc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = sysbus_fdc_properties;
+ device_class_set_props(dc, sysbus_fdc_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -2709,7 +2709,7 @@ static void sun4m_fdc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = sun4m_fdc_properties;
+ device_class_set_props(dc, sun4m_fdc_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -1228,7 +1228,7 @@ static void m25p80_class_init(ObjectClass *klass, void *data)
k->set_cs = m25p80_cs;
k->cs_polarity = SSI_CS_LOW;
dc->vmsd = &vmstate_m25p80;
- dc->props = m25p80_properties;
+ device_class_set_props(dc, m25p80_properties);
dc->reset = m25p80_reset;
mc->pi = data;
}
@@ -437,7 +437,7 @@ static void nand_class_init(ObjectClass *klass, void *data)
dc->realize = nand_realize;
dc->reset = nand_reset;
dc->vmsd = &vmstate_nand;
- dc->props = nand_properties;
+ device_class_set_props(dc, nand_properties);
}
static const TypeInfo nand_info = {
@@ -959,7 +959,7 @@ static void nvme_class_init(ObjectClass *oc, void *data)
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->desc = "Non-Volatile Memory Express";
- dc->props = nvme_props;
+ device_class_set_props(dc, nvme_props);
dc->vmsd = &nvme_vmstate;
}
@@ -838,7 +838,7 @@ static void onenand_class_init(ObjectClass *klass, void *data)
k->init = onenand_initfn;
dc->reset = onenand_system_reset;
- dc->props = onenand_properties;
+ device_class_set_props(dc, onenand_properties);
}
static const TypeInfo onenand_info = {
@@ -893,7 +893,7 @@ static void pflash_cfi01_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = pflash_cfi01_realize;
- dc->props = pflash_cfi01_properties;
+ device_class_set_props(dc, pflash_cfi01_properties);
dc->vmsd = &vmstate_pflash;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -744,7 +744,7 @@ static void pflash_cfi02_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = pflash_cfi02_realize;
- dc->props = pflash_cfi02_properties;
+ device_class_set_props(dc, pflash_cfi02_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -990,7 +990,7 @@ static void virtio_blk_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->props = virtio_blk_properties;
+ device_class_set_props(dc, virtio_blk_properties);
dc->vmsd = &vmstate_virtio_blk;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->realize = virtio_blk_device_realize;
@@ -300,7 +300,7 @@ static void bcm2835_aux_class_init(ObjectClass *oc, void *data)
dc->realize = bcm2835_aux_realize;
dc->vmsd = &vmstate_bcm2835_aux;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
- dc->props = bcm2835_aux_props;
+ device_class_set_props(dc, bcm2835_aux_props);
}
static const TypeInfo bcm2835_aux_info = {
@@ -532,7 +532,7 @@ static void cadence_uart_class_init(ObjectClass *klass, void *data)
dc->realize = cadence_uart_realize;
dc->vmsd = &vmstate_cadence_uart;
dc->reset = cadence_uart_reset;
- dc->props = cadence_uart_properties;
+ device_class_set_props(dc, cadence_uart_properties);
}
static const TypeInfo cadence_uart_info = {
@@ -125,7 +125,7 @@ static void debugcon_isa_class_initfn(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = debugcon_isa_realizefn;
- dc->props = debugcon_isa_properties;
+ device_class_set_props(dc, debugcon_isa_properties);
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -184,7 +184,7 @@ static void digic_uart_class_init(ObjectClass *klass, void *data)
dc->realize = digic_uart_realize;
dc->reset = digic_uart_reset;
dc->vmsd = &vmstate_digic_uart;
- dc->props = digic_uart_properties;
+ device_class_set_props(dc, digic_uart_properties);
}
static const TypeInfo digic_uart_info = {
@@ -1048,7 +1048,7 @@ static void escc_class_init(ObjectClass *klass, void *data)
dc->reset = escc_reset;
dc->realize = escc_realize;
dc->vmsd = &vmstate_escc;
- dc->props = escc_properties;
+ device_class_set_props(dc, escc_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -243,7 +243,7 @@ static void etraxfs_ser_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = etraxfs_ser_reset;
- dc->props = etraxfs_ser_properties;
+ device_class_set_props(dc, etraxfs_ser_properties);
dc->realize = etraxfs_ser_realize;
}
@@ -661,7 +661,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;
+ device_class_set_props(dc, exynos4210_uart_properties);
dc->vmsd = &vmstate_exynos4210_uart;
}
@@ -283,7 +283,7 @@ static void grlib_apbuart_class_init(ObjectClass *klass, void *data)
k->init = grlib_apbuart_init;
dc->reset = grlib_apbuart_reset;
- dc->props = grlib_apbuart_properties;
+ device_class_set_props(dc, grlib_apbuart_properties);
}
static const TypeInfo grlib_apbuart_info = {
@@ -351,7 +351,7 @@ static void imx_serial_class_init(ObjectClass *klass, void *data)
dc->reset = imx_serial_reset_at_boot;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
dc->desc = "i.MX series UART";
- dc->props = imx_serial_properties;
+ device_class_set_props(dc, imx_serial_properties);
}
static const TypeInfo imx_serial_info = {
@@ -587,7 +587,7 @@ static void ipoctal_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
dc->desc = "GE IP-Octal 232 8-channel RS-232 IndustryPack";
- dc->props = ipoctal_properties;
+ device_class_set_props(dc, ipoctal_properties);
dc->vmsd = &vmstate_ipoctal;
}
@@ -147,7 +147,7 @@ static void lm32_juart_class_init(ObjectClass *klass, void *data)
dc->reset = juart_reset;
dc->vmsd = &vmstate_lm32_juart;
- dc->props = lm32_juart_properties;
+ device_class_set_props(dc, lm32_juart_properties);
dc->realize = lm32_juart_realize;
}
@@ -293,7 +293,7 @@ static void lm32_uart_class_init(ObjectClass *klass, void *data)
dc->reset = uart_reset;
dc->vmsd = &vmstate_lm32_uart;
- dc->props = lm32_uart_properties;
+ device_class_set_props(dc, lm32_uart_properties);
dc->realize = lm32_uart_realize;
}
@@ -239,7 +239,7 @@ static void milkymist_uart_class_init(ObjectClass *klass, void *data)
dc->realize = milkymist_uart_realize;
dc->reset = milkymist_uart_reset;
dc->vmsd = &vmstate_milkymist_uart;
- dc->props = milkymist_uart_properties;
+ device_class_set_props(dc, milkymist_uart_properties);
}
static const TypeInfo milkymist_uart_info = {
@@ -629,7 +629,7 @@ static void parallel_isa_class_initfn(ObjectClass *klass, void *data)
dc->realize = parallel_isa_realizefn;
dc->vmsd = &vmstate_parallel_isa;
- dc->props = parallel_isa_properties;
+ device_class_set_props(dc, parallel_isa_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -343,7 +343,7 @@ static void pl011_class_init(ObjectClass *oc, void *data)
dc->realize = pl011_realize;
dc->vmsd = &vmstate_pl011;
- dc->props = pl011_properties;
+ device_class_set_props(dc, pl011_properties);
}
static const TypeInfo pl011_arm_info = {
@@ -346,7 +346,7 @@ static void console_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
SCLPEventClass *ec = SCLP_EVENT_CLASS(klass);
- dc->props = console_properties;
+ device_class_set_props(dc, console_properties);
dc->reset = console_reset;
dc->vmsd = &vmstate_sclplmconsole;
ec->init = console_init;
@@ -263,7 +263,7 @@ static void console_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
SCLPEventClass *ec = SCLP_EVENT_CLASS(klass);
- dc->props = console_properties;
+ device_class_set_props(dc, console_properties);
dc->reset = console_reset;
dc->vmsd = &vmstate_sclpconsole;
ec->init = console_init;
@@ -103,7 +103,7 @@ static void serial_isa_class_initfn(ObjectClass *klass, void *data)
dc->realize = serial_isa_realizefn;
dc->vmsd = &vmstate_isa_serial;
- dc->props = serial_isa_properties;
+ device_class_set_props(dc, serial_isa_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -211,7 +211,7 @@ static void serial_pci_class_initfn(ObjectClass *klass, void *data)
pc->revision = 1;
pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL;
dc->vmsd = &vmstate_pci_serial;
- dc->props = serial_pci_properties;
+ device_class_set_props(dc, serial_pci_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -226,7 +226,7 @@ static void multi_2x_serial_pci_class_initfn(ObjectClass *klass, void *data)
pc->revision = 1;
pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL;
dc->vmsd = &vmstate_pci_multi_serial;
- dc->props = multi_2x_serial_pci_properties;
+ device_class_set_props(dc, multi_2x_serial_pci_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -241,7 +241,7 @@ static void multi_4x_serial_pci_class_initfn(ObjectClass *klass, void *data)
pc->revision = 1;
pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL;
dc->vmsd = &vmstate_pci_multi_serial;
- dc->props = multi_4x_serial_pci_properties;
+ device_class_set_props(dc, multi_4x_serial_pci_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -171,7 +171,7 @@ static void spapr_vty_class_init(ObjectClass *klass, void *data)
k->dt_type = "serial";
k->dt_compatible = "hvterm1";
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
- dc->props = spapr_vty_properties;
+ device_class_set_props(dc, spapr_vty_properties);
dc->vmsd = &vmstate_spapr_vty;
}
@@ -223,7 +223,7 @@ static void stm32f2xx_usart_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = stm32f2xx_usart_reset;
- dc->props = stm32f2xx_usart_properties;
+ device_class_set_props(dc, stm32f2xx_usart_properties);
dc->realize = stm32f2xx_usart_realize;
}
@@ -237,7 +237,7 @@ static void virtserialport_class_init(ObjectClass *klass, void *data)
k->have_data = flush_buf;
k->set_guest_connected = set_guest_connected;
k->guest_writable = guest_writable;
- dc->props = virtserialport_properties;
+ device_class_set_props(dc, virtserialport_properties);
}
static const TypeInfo virtserialport_info = {
@@ -1091,7 +1091,7 @@ static void virtio_serial_port_class_init(ObjectClass *klass, void *data)
k->bus_type = TYPE_VIRTIO_SERIAL_BUS;
k->realize = virtser_port_device_realize;
k->unrealize = virtser_port_device_unrealize;
- k->props = virtser_props;
+ device_class_set_props(k, virtser_props);
}
static const TypeInfo virtio_serial_port_type_info = {
@@ -1149,7 +1149,7 @@ static void virtio_serial_class_init(ObjectClass *klass, void *data)
QLIST_INIT(&vserdevices.devices);
- dc->props = virtio_serial_properties;
+ device_class_set_props(dc, virtio_serial_properties);
dc->vmsd = &vmstate_virtio_console;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
vdc->realize = virtio_serial_device_realize;
@@ -234,7 +234,7 @@ static void xilinx_uartlite_class_init(ObjectClass *klass, void *data)
dc->reset = xilinx_uartlite_reset;
dc->realize = xilinx_uartlite_realize;
- dc->props = xilinx_uartlite_properties;
+ device_class_set_props(dc, xilinx_uartlite_properties);
}
static const TypeInfo xilinx_uartlite_info = {
@@ -192,7 +192,7 @@ static void generic_loader_class_init(ObjectClass *klass, void *data)
*/
dc->realize = generic_loader_realize;
dc->unrealize = generic_loader_unrealize;
- dc->props = generic_loader_props;
+ device_class_set_props(dc, generic_loader_props);
dc->desc = "Generic Loader";
}
@@ -86,7 +86,7 @@ static void or_irq_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = or_irq_reset;
- dc->props = or_irq_properties;
+ device_class_set_props(dc, or_irq_properties);
dc->realize = or_irq_realize;
dc->vmsd = &vmstate_or_irq;
}
@@ -230,7 +230,7 @@ static void platform_bus_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = platform_bus_realize;
- dc->props = platform_bus_properties;
+ device_class_set_props(dc, platform_bus_properties);
}
static const TypeInfo platform_bus_info = {
@@ -848,6 +848,12 @@ void qdev_alias_all_properties(DeviceState *target, Object *source)
} while (class != object_class_by_name(TYPE_DEVICE));
}
+void device_class_set_props(DeviceClass *dc, Property *props)
+{
+ assert(!dc->props);
+ dc->props = props;
+}
+
static int qdev_add_hotpluggable_device(Object *obj, void *opaque)
{
GSList **list = opaque;
@@ -138,7 +138,7 @@ static void a15mp_priv_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = a15mp_priv_realize;
- dc->props = a15mp_priv_properties;
+ device_class_set_props(dc, a15mp_priv_properties);
/* We currently have no savable state */
}
@@ -174,7 +174,7 @@ static void a9mp_priv_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = a9mp_priv_realize;
- dc->props = a9mp_priv_properties;
+ device_class_set_props(dc, a9mp_priv_properties);
}
static const TypeInfo a9mp_priv_info = {
@@ -155,7 +155,7 @@ static void mpcore_priv_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = mpcore_priv_realize;
- dc->props = mpcore_priv_properties;
+ device_class_set_props(dc, mpcore_priv_properties);
}
static const TypeInfo mpcore_priv_info = {
@@ -122,7 +122,7 @@ static void mpcore_rirq_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = realview_mpcore_realize;
- dc->props = mpcore_rirq_properties;
+ device_class_set_props(dc, mpcore_rirq_properties);
}
static const TypeInfo mpcore_rirq_info = {
@@ -404,7 +404,7 @@ static void bcm2835_fb_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = bcm2835_fb_props;
+ device_class_set_props(dc, bcm2835_fb_props);
dc->realize = bcm2835_fb_realize;
dc->reset = bcm2835_fb_reset;
dc->vmsd = &vmstate_bcm2835_fb;
@@ -382,7 +382,7 @@ static void cg3_class_init(ObjectClass *klass, void *data)
dc->realize = cg3_realizefn;
dc->reset = cg3_reset;
dc->vmsd = &vmstate_cg3;
- dc->props = cg3_properties;
+ device_class_set_props(dc, cg3_properties);
}
static const TypeInfo cg3_info = {
@@ -2995,7 +2995,7 @@ static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_cirrus_vga;
dc->realize = isa_cirrus_vga_realizefn;
- dc->props = isa_cirrus_vga_properties;
+ device_class_set_props(dc, isa_cirrus_vga_properties);
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
}
@@ -3071,7 +3071,7 @@ static void cirrus_vga_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->desc = "Cirrus CLGD 54xx VGA";
dc->vmsd = &vmstate_pci_cirrus_vga;
- dc->props = pci_vga_cirrus_properties;
+ device_class_set_props(dc, pci_vga_cirrus_properties);
dc->hotpluggable = false;
}
@@ -541,7 +541,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;
+ device_class_set_props(dc, g364fb_sysbus_properties);
}
static const TypeInfo g364fb_sysbus_info = {
@@ -338,7 +338,7 @@ static void milkymist_vgafb_class_init(ObjectClass *klass, void *data)
dc->reset = milkymist_vgafb_reset;
dc->vmsd = &vmstate_milkymist_vgafb;
- dc->props = milkymist_vgafb_properties;
+ device_class_set_props(dc, milkymist_vgafb_properties);
dc->realize = milkymist_vgafb_realize;
}
@@ -2339,7 +2339,7 @@ static void qxl_pci_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->reset = qxl_reset_handler;
dc->vmsd = &qxl_vmstate;
- dc->props = qxl_properties;
+ device_class_set_props(dc, qxl_properties);
}
static const TypeInfo qxl_pci_type_info = {
@@ -1087,7 +1087,7 @@ static void tcx_class_init(ObjectClass *klass, void *data)
dc->realize = tcx_realizefn;
dc->reset = tcx_reset;
dc->vmsd = &vmstate_tcx;
- dc->props = tcx_properties;
+ device_class_set_props(dc, tcx_properties);
}
static const TypeInfo tcx_info = {
@@ -91,7 +91,7 @@ static void vga_isa_class_initfn(ObjectClass *klass, void *data)
dc->realize = vga_isa_realizefn;
dc->reset = vga_isa_reset;
dc->vmsd = &vmstate_vga_common;
- dc->props = vga_isa_properties;
+ device_class_set_props(dc, vga_isa_properties);
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
}
@@ -348,7 +348,7 @@ static void vga_class_init(ObjectClass *klass, void *data)
k->realize = pci_std_vga_realize;
k->romfile = "vgabios-stdvga.bin";
k->class_id = PCI_CLASS_DISPLAY_VGA;
- dc->props = vga_pci_properties;
+ device_class_set_props(dc, vga_pci_properties);
dc->hotpluggable = false;
}
@@ -359,7 +359,7 @@ static void secondary_class_init(ObjectClass *klass, void *data)
k->realize = pci_secondary_vga_realize;
k->class_id = PCI_CLASS_DISPLAY_OTHER;
- dc->props = secondary_pci_properties;
+ device_class_set_props(dc, secondary_pci_properties);
dc->reset = pci_secondary_vga_reset;
}
@@ -47,7 +47,7 @@ static void virtio_gpu_pci_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
- dc->props = virtio_gpu_pci_properties;
+ device_class_set_props(dc, virtio_gpu_pci_properties);
dc->hotpluggable = false;
k->realize = virtio_gpu_pci_realize;
pcidev_k->class_id = PCI_CLASS_DISPLAY_OTHER;
@@ -1262,7 +1262,7 @@ static void virtio_gpu_class_init(ObjectClass *klass, void *data)
vdc->reset = virtio_gpu_reset;
- dc->props = virtio_gpu_properties;
+ device_class_set_props(dc, virtio_gpu_properties);
dc->vmsd = &vmstate_virtio_gpu;
}
@@ -186,7 +186,7 @@ static void virtio_vga_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
- dc->props = virtio_vga_properties;
+ device_class_set_props(dc, virtio_vga_properties);
dc->reset = virtio_vga_reset;
dc->vmsd = &vmstate_virtio_vga;
dc->hotpluggable = false;
@@ -1356,7 +1356,7 @@ static void vmsvga_class_init(ObjectClass *klass, void *data)
k->subsystem_id = SVGA_PCI_DEVICE_ID;
dc->reset = vmsvga_reset;
dc->vmsd = &vmstate_vmware_vga;
- dc->props = vga_vmware_properties;
+ device_class_set_props(dc, vga_vmware_properties);
dc->hotpluggable = false;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
}
@@ -138,7 +138,7 @@ static void i82374_class_init(ObjectClass *klass, void *data)
dc->realize = i82374_realize;
dc->vmsd = &vmstate_i82374;
- dc->props = i82374_properties;
+ device_class_set_props(dc, i82374_properties);
}
static const TypeInfo i82374_info = {
@@ -590,7 +590,7 @@ static void i8257_class_init(ObjectClass *klass, void *data)
dc->realize = i8257_realize;
dc->reset = i8257_reset;
dc->vmsd = &vmstate_i8257;
- dc->props = i8257_properties;
+ device_class_set_props(dc, i8257_properties);
idc->get_transfer_mode = i8257_dma_get_transfer_mode;
idc->has_autoinitialization = i8257_dma_has_autoinitialization;
@@ -1650,7 +1650,7 @@ static void pl330_class_init(ObjectClass *klass, void *data)
dc->realize = pl330_realize;
dc->reset = pl330_reset;
- dc->props = pl330_properties;
+ device_class_set_props(dc, pl330_properties);
dc->vmsd = &vmstate_pl330;
}
@@ -562,7 +562,7 @@ static void pxa2xx_dma_class_init(ObjectClass *klass, void *data)
dc->desc = "PXA2xx DMA controller";
dc->vmsd = &vmstate_pxa2xx_dma;
- dc->props = pxa2xx_dma_properties;
+ device_class_set_props(dc, pxa2xx_dma_properties);
dc->realize = pxa2xx_dma_realize;
}
@@ -303,7 +303,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;
+ device_class_set_props(dc, sparc32_dma_properties);
/* Reason: pointer property "iommu_opaque" */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -375,7 +375,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;
+ device_class_set_props(dc, iommu_properties);
}
static const TypeInfo iommu_info = {
@@ -604,7 +604,7 @@ static void axidma_class_init(ObjectClass *klass, void *data)
dc->realize = xilinx_axidma_realize,
dc->reset = xilinx_axidma_reset;
- dc->props = axidma_properties;
+ device_class_set_props(dc, axidma_properties);
}
static StreamSlaveClass xilinx_axidma_data_stream_class = {
@@ -331,7 +331,7 @@ static void imx_gpio_class_init(ObjectClass *klass, void *data)
dc->realize = imx_gpio_realize;
dc->reset = imx_gpio_reset;
- dc->props = imx_gpio_properties;
+ device_class_set_props(dc, imx_gpio_properties);
dc->vmsd = &vmstate_imx_gpio;
dc->desc = "i.MX GPIO controller";
}
@@ -771,7 +771,7 @@ static void omap_gpio_class_init(ObjectClass *klass, void *data)
dc->realize = omap_gpio_realize;
dc->reset = omap_gpif_reset;
- dc->props = omap_gpio_properties;
+ device_class_set_props(dc, omap_gpio_properties);
/* Reason: pointer property "clk" */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -802,7 +802,7 @@ static void omap2_gpio_class_init(ObjectClass *klass, void *data)
dc->realize = omap2_gpio_realize;
dc->reset = omap2_gpif_reset;
- dc->props = omap2_gpio_properties;
+ device_class_set_props(dc, omap2_gpio_properties);
/* Reason: pointer properties "iclk", "fclk0", ..., "fclk5" */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -268,7 +268,7 @@ static void i2c_slave_class_init(ObjectClass *klass, void *data)
k->init = i2c_slave_qdev_init;
set_bit(DEVICE_CATEGORY_MISC, k->categories);
k->bus_type = TYPE_I2C_BUS;
- k->props = i2c_props;
+ device_class_set_props(k, i2c_props);
}
static const TypeInfo i2c_slave_type_info = {
@@ -488,7 +488,7 @@ static void omap_i2c_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = omap_i2c_properties;
+ device_class_set_props(dc, omap_i2c_properties);
dc->reset = omap_i2c_reset;
/* Reason: pointer properties "iclk", "fclk" */
dc->cannot_instantiate_with_device_add_yet = true;
@@ -121,7 +121,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;
+ device_class_set_props(dc, smbus_eeprom_properties);
/* Reason: pointer property "data" */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -2542,7 +2542,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;
@@ -320,7 +320,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 = {
@@ -161,7 +161,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 = {
@@ -1861,7 +1861,7 @@ static void assign_class_init(ObjectClass *klass, void *data)
k->exit = assigned_exitfn;
k->config_read = assigned_dev_pci_read_config;
k->config_write = assigned_dev_pci_write_config;
- dc->props = assigned_dev_properties;
+ device_class_set_props(dc, assigned_dev_properties);
dc->vmsd = &vmstate_assigned_device;
dc->reset = reset_assigned_device;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
@@ -119,7 +119,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);
}
static const TypeInfo xen_pv_type_info = {
@@ -1704,7 +1704,7 @@ static void sysbus_ahci_class_init(ObjectClass *klass, void *data)
dc->realize = sysbus_ahci_realize;
dc->vmsd = &vmstate_sysbus_ahci;
- dc->props = sysbus_ahci_properties;
+ device_class_set_props(dc, sysbus_ahci_properties);
dc->reset = sysbus_ahci_reset;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -417,7 +417,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_STORAGE_IDE;
k->config_read = cmd646_pci_config_read;
k->config_write = cmd646_pci_config_write;
- dc->props = cmd646_ide_properties;
+ device_class_set_props(dc, cmd646_ide_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -116,7 +116,7 @@ static void isa_ide_class_initfn(ObjectClass *klass, void *data)
dc->realize = isa_ide_realizefn;
dc->fw_name = "ide";
dc->reset = isa_ide_reset;
- dc->props = isa_ide_properties;
+ device_class_set_props(dc, isa_ide_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -152,7 +152,7 @@ static void mmio_ide_class_init(ObjectClass *oc, void *data)
dc->realize = mmio_ide_realizefn;
dc->reset = mmio_ide_reset;
- dc->props = mmio_ide_properties;
+ device_class_set_props(dc, mmio_ide_properties);
dc->vmsd = &vmstate_ide_mmio;
}
@@ -305,7 +305,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;
+ device_class_set_props(dc, ide_hd_properties);
}
static const TypeInfo ide_hd_info = {
@@ -327,7 +327,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;
+ device_class_set_props(dc, ide_cd_properties);
}
static const TypeInfo ide_cd_info = {
@@ -349,7 +349,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;
+ device_class_set_props(dc, ide_drive_properties);
}
static const TypeInfo ide_drive_info = {
@@ -366,7 +366,7 @@ static void ide_device_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_STORAGE, k->categories);
k->bus_type = TYPE_IDE_BUS;
k->unrealize = idebus_unrealize;
- k->props = ide_props;
+ device_class_set_props(k, ide_props);
}
static const TypeInfo ide_device_type_info = {
@@ -301,7 +301,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;
+ device_class_set_props(dc, milkymist_softusb_properties);
}
static const TypeInfo milkymist_softusb_info = {
@@ -327,7 +327,7 @@ static void virtio_input_hid_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
VirtIOInputClass *vic = VIRTIO_INPUT_CLASS(klass);
- dc->props = virtio_input_hid_properties;
+ device_class_set_props(dc, virtio_input_hid_properties);
vic->realize = virtio_input_hid_realize;
vic->unrealize = virtio_input_hid_unrealize;
vic->change_active = virtio_input_hid_change_active;
@@ -226,7 +226,7 @@ static void virtio_input_host_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &vmstate_virtio_input_host;
- dc->props = virtio_input_host_properties;
+ device_class_set_props(dc, virtio_input_host_properties);
vic->realize = virtio_input_host_realize;
vic->unrealize = virtio_input_host_unrealize;
vic->handle_status = virtio_input_host_handle_status;
@@ -310,7 +310,7 @@ static void virtio_input_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->props = virtio_input_properties;
+ device_class_set_props(dc, virtio_input_properties);
dc->vmsd = &vmstate_virtio_input;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
vdc->realize = virtio_input_device_realize;
@@ -284,7 +284,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);
/* Reason: pointer property "ps2_mouse" */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -442,7 +442,7 @@ static void apic_common_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = apic_reset_common;
- dc->props = apic_properties_common;
+ device_class_set_props(dc, apic_properties_common);
dc->realize = apic_common_realize;
dc->unrealize = apic_common_unrealize;
/*
@@ -264,7 +264,7 @@ static void arm_gic_common_class_init(ObjectClass *klass, void *data)
dc->reset = arm_gic_common_reset;
dc->realize = arm_gic_common_realize;
- dc->props = arm_gic_common_properties;
+ device_class_set_props(dc, arm_gic_common_properties);
dc->vmsd = &vmstate_gic;
albifc->arm_linux_init = arm_gic_common_linux_init;
}
@@ -176,7 +176,7 @@ static void gicv2m_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = gicv2m_properties;
+ device_class_set_props(dc, gicv2m_properties);
dc->realize = gicv2m_realize;
}
@@ -325,7 +325,7 @@ static void arm_gicv3_common_class_init(ObjectClass *klass, void *data)
dc->reset = arm_gicv3_common_reset;
dc->realize = arm_gicv3_common_realize;
- dc->props = arm_gicv3_common_properties;
+ device_class_set_props(dc, arm_gicv3_common_properties);
dc->vmsd = &vmstate_gicv3;
albifc->arm_linux_init = arm_gic_common_linux_init;
}
@@ -170,7 +170,7 @@ static void etraxfs_pic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = etraxfs_pic_properties;
+ device_class_set_props(dc, etraxfs_pic_properties);
/*
* Note: pointer property "interrupt_vector" may remain null, thus
* no need for dc->cannot_instantiate_with_device_add_yet = true;
@@ -437,7 +437,7 @@ static void exynos4210_combiner_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = exynos4210_combiner_reset;
- dc->props = exynos4210_combiner_properties;
+ device_class_set_props(dc, exynos4210_combiner_properties);
dc->vmsd = &vmstate_exynos4210_combiner;
}
@@ -346,7 +346,7 @@ static void exynos4210_gic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = exynos4210_gic_properties;
+ device_class_set_props(dc, exynos4210_gic_properties);
}
static const TypeInfo exynos4210_gic_info = {
@@ -453,7 +453,7 @@ static void exynos4210_irq_gate_class_init(ObjectClass *klass, void *data)
dc->reset = exynos4210_irq_gate_reset;
dc->vmsd = &vmstate_exynos4210_irq_gate;
- dc->props = exynos4210_irq_gate_properties;
+ device_class_set_props(dc, exynos4210_irq_gate_properties);
dc->realize = exynos4210_irq_gate_realize;
}
@@ -358,7 +358,7 @@ static void grlib_irqmp_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = grlib_irqmp_reset;
- dc->props = grlib_irqmp_properties;
+ device_class_set_props(dc, grlib_irqmp_properties);
/* Reason: pointer properties "set_pil_in", "set_pil_in_opaque" */
dc->cannot_instantiate_with_device_add_yet = true;
dc->realize = grlib_irqmp_realize;
@@ -136,7 +136,7 @@ static void pic_common_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &vmstate_pic_common;
- dc->props = pic_properties_common;
+ device_class_set_props(dc, pic_properties_common);
dc->realize = pic_common_realize;
/*
* Reason: unlike ordinary ISA devices, the PICs need additional
@@ -427,7 +427,7 @@ static void ioapic_class_init(ObjectClass *klass, void *data)
k->realize = ioapic_realize;
dc->reset = ioapic_reset_common;
- dc->props = ioapic_properties;
+ device_class_set_props(dc, ioapic_properties);
}
static const TypeInfo ioapic_info = {
@@ -440,7 +440,7 @@ static void mips_gic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = mips_gic_properties;
+ device_class_set_props(dc, mips_gic_properties);
dc->realize = mips_gic_realize;
}
@@ -399,7 +399,7 @@ static void omap_intc_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = omap_inth_reset;
- dc->props = omap_intc_properties;
+ device_class_set_props(dc, omap_intc_properties);
/* Reason: pointer property "clk" */
dc->cannot_instantiate_with_device_add_yet = true;
dc->realize = omap_intc_realize;
@@ -654,7 +654,7 @@ static void omap2_intc_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = omap_inth_reset;
- dc->props = omap2_intc_properties;
+ device_class_set_props(dc, omap2_intc_properties);
/* Reason: pointer property "iclk", "fclk" */
dc->cannot_instantiate_with_device_add_yet = true;
dc->realize = omap2_intc_realize;
@@ -1643,7 +1643,7 @@ static void openpic_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = openpic_realize;
- dc->props = openpic_properties;
+ device_class_set_props(dc, openpic_properties);
dc->reset = openpic_reset;
dc->vmsd = &vmstate_openpic;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
@@ -277,7 +277,7 @@ static void kvm_openpic_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = kvm_openpic_realize;
- dc->props = kvm_openpic_properties;
+ device_class_set_props(dc, kvm_openpic_properties);
dc->reset = kvm_openpic_reset;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -183,7 +183,7 @@ static void xilinx_intc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = xilinx_intc_properties;
+ device_class_set_props(dc, xilinx_intc_properties);
}
static const TypeInfo xilinx_intc_info = {
@@ -84,7 +84,7 @@ static void ipack_device_class_init(ObjectClass *klass, void *data)
k->bus_type = TYPE_IPACK_BUS;
k->realize = ipack_device_realize;
k->unrealize = ipack_device_unrealize;
- k->props = ipack_device_props;
+ device_class_set_props(k, ipack_device_props);
}
const VMStateDescription vmstate_ipack_device = {
@@ -110,7 +110,7 @@ static void bmc_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
- dc->props = ipmi_bmc_properties;
+ device_class_set_props(dc, ipmi_bmc_properties);
}
static TypeInfo ipmi_bmc_type_info = {
@@ -512,7 +512,7 @@ static void ipmi_bmc_extern_class_init(ObjectClass *oc, void *data)
bk->handle_command = ipmi_bmc_extern_handle_command;
bk->handle_reset = ipmi_bmc_extern_handle_reset;
dc->realize = ipmi_bmc_extern_realize;
- dc->props = ipmi_bmc_extern_properties;
+ device_class_set_props(dc, ipmi_bmc_extern_properties);
}
static const TypeInfo ipmi_bmc_extern_type = {
@@ -511,7 +511,7 @@ static void isa_ipmi_bt_class_init(ObjectClass *oc, void *data)
IPMIInterfaceClass *iic = IPMI_INTERFACE_CLASS(oc);
dc->realize = isa_ipmi_bt_realize;
- dc->props = ipmi_isa_properties;
+ device_class_set_props(dc, ipmi_isa_properties);
iic->get_backend_data = isa_ipmi_bt_get_backend_data;
ipmi_bt_class_init(iic);
@@ -475,7 +475,7 @@ static void isa_ipmi_kcs_class_init(ObjectClass *oc, void *data)
IPMIInterfaceClass *iic = IPMI_INTERFACE_CLASS(oc);
dc->realize = ipmi_isa_realize;
- dc->props = ipmi_isa_properties;
+ device_class_set_props(dc, ipmi_isa_properties);
iic->get_backend_data = isa_ipmi_kcs_get_backend_data;
ipmi_kcs_class_init(iic);
@@ -710,7 +710,7 @@ static void ich9_lpc_class_init(ObjectClass *klass, void *data)
dc->reset = ich9_lpc_reset;
k->realize = ich9_lpc_realize;
dc->vmsd = &vmstate_ich9_lpc;
- dc->props = ich9_lpc_properties;
+ device_class_set_props(dc, ich9_lpc_properties);
k->config_write = ich9_lpc_config_write;
dc->desc = "ICH9 LPC bridge";
k->vendor_id = PCI_VENDOR_ID_INTEL;
@@ -385,7 +385,7 @@ static void pc87312_class_init(ObjectClass *klass, void *data)
dc->realize = pc87312_realize;
dc->reset = pc87312_reset;
dc->vmsd = &vmstate_pc87312;
- dc->props = pc87312_properties;
+ device_class_set_props(dc, pc87312_properties);
}
static const TypeInfo pc87312_type_info = {
@@ -411,7 +411,7 @@ static void via_pm_class_init(ObjectClass *klass, void *data)
dc->desc = "PM";
dc->vmsd = &vmstate_acpi;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
- dc->props = via_pm_properties;
+ device_class_set_props(dc, via_pm_properties);
}
static const TypeInfo via_pm_info = {
@@ -443,7 +443,7 @@ static void pc_dimm_class_init(ObjectClass *oc, void *data)
dc->realize = pc_dimm_realize;
dc->unrealize = pc_dimm_unrealize;
- dc->props = pc_dimm_properties;
+ device_class_set_props(dc, pc_dimm_properties);
dc->desc = "DIMM memory module";
ddc->get_memory_region = pc_dimm_get_memory_region;
@@ -173,7 +173,7 @@ static void mips_cps_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = mips_cps_realize;
- dc->props = mips_cps_properties;
+ device_class_set_props(dc, mips_cps_properties);
}
static const TypeInfo mips_cps_info = {
@@ -132,7 +132,7 @@ static void a9_scu_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = a9_scu_properties;
+ device_class_set_props(dc, a9_scu_properties);
dc->vmsd = &vmstate_a9_scu;
dc->reset = a9_scu_reset;
}
@@ -261,7 +261,7 @@ static void qdev_applesmc_class_init(ObjectClass *klass, void *data)
dc->realize = applesmc_isa_realize;
dc->reset = qdev_applesmc_isa_reset;
- dc->props = applesmc_isa_properties;
+ device_class_set_props(dc, applesmc_isa_properties);
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -83,7 +83,7 @@ static void arm11_scu_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = arm11_scu_realize;
- dc->props = arm11_scu_properties;
+ device_class_set_props(dc, arm11_scu_properties);
}
static const TypeInfo arm11_scu_type_info = {
@@ -179,7 +179,7 @@ static void l2x0_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &vmstate_l2x0;
- dc->props = l2x0_properties;
+ device_class_set_props(dc, l2x0_properties);
dc->reset = l2x0_priv_reset;
}
@@ -639,7 +639,7 @@ static void arm_sysctl_class_init(ObjectClass *klass, void *data)
dc->realize = arm_sysctl_realize;
dc->reset = arm_sysctl_reset;
dc->vmsd = &vmstate_arm_sysctl;
- dc->props = arm_sysctl_properties;
+ device_class_set_props(dc, arm_sysctl_properties);
}
static const TypeInfo arm_sysctl_info = {
@@ -307,7 +307,7 @@ static void aspeed_scu_class_init(ObjectClass *klass, void *data)
dc->reset = aspeed_scu_reset;
dc->desc = "ASPEED System Control Unit";
dc->vmsd = &vmstate_aspeed_scu;
- dc->props = aspeed_scu_properties;
+ device_class_set_props(dc, aspeed_scu_properties);
}
static const TypeInfo aspeed_scu_info = {
@@ -262,7 +262,7 @@ static void aspeed_sdmc_class_init(ObjectClass *klass, void *data)
dc->reset = aspeed_sdmc_reset;
dc->desc = "ASPEED SDRAM Memory Controller";
dc->vmsd = &vmstate_aspeed_sdmc;
- dc->props = aspeed_sdmc_properties;
+ device_class_set_props(dc, aspeed_sdmc_properties);
}
static const TypeInfo aspeed_sdmc_info = {
@@ -419,7 +419,7 @@ static void bcm2835_property_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = bcm2835_property_props;
+ device_class_set_props(dc, bcm2835_property_props);
dc->realize = bcm2835_property_realize;
dc->vmsd = &vmstate_bcm2835_property;
}
@@ -58,7 +58,7 @@ static void debug_exit_class_initfn(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = debug_exit_realizefn;
- dc->props = debug_exit_properties;
+ device_class_set_props(dc, debug_exit_properties);
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -326,7 +326,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;
+ device_class_set_props(dc, ecc_properties);
}
static const TypeInfo ecc_info = {
@@ -1073,7 +1073,7 @@ static void ivshmem_plain_class_init(ObjectClass *klass, void *data)
k->realize = ivshmem_plain_realize;
k->exit = ivshmem_plain_exit;
- dc->props = ivshmem_plain_properties;
+ device_class_set_props(dc, ivshmem_plain_properties);
dc->vmsd = &ivshmem_plain_vmsd;
}
@@ -1135,7 +1135,7 @@ static void ivshmem_doorbell_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->realize = ivshmem_doorbell_realize;
- dc->props = ivshmem_doorbell_properties;
+ device_class_set_props(dc, ivshmem_doorbell_properties);
dc->vmsd = &ivshmem_doorbell_vmsd;
}
@@ -1303,7 +1303,7 @@ static void ivshmem_class_init(ObjectClass *klass, void *data)
k->realize = ivshmem_realize;
k->revision = 0;
dc->desc = "Inter-VM shared memory (legacy)";
- dc->props = ivshmem_properties;
+ device_class_set_props(dc, ivshmem_properties);
dc->vmsd = &ivshmem_vmsd;
}
@@ -945,7 +945,7 @@ static void cuda_class_init(ObjectClass *oc, void *data)
dc->realize = cuda_realizefn;
dc->reset = cuda_reset;
dc->vmsd = &vmstate_cuda;
- dc->props = cuda_properties;
+ device_class_set_props(dc, cuda_properties);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
}
@@ -388,7 +388,7 @@ static void macio_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_APPLE;
k->class_id = PCI_CLASS_OTHERS << 8;
- dc->props = macio_properties;
+ device_class_set_props(dc, macio_properties);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
}
@@ -224,7 +224,7 @@ static void mips_gcr_realize(DeviceState *dev, Error **errp)
static void mips_gcr_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = mips_gcr_properties;
+ device_class_set_props(dc, mips_gcr_properties);
dc->vmsd = &vmstate_mips_gcr;
dc->reset = mips_gcr_reset;
dc->realize = mips_gcr_realize;
@@ -159,7 +159,7 @@ static void mips_cpc_class_init(ObjectClass *klass, void *data)
dc->realize = mips_cpc_realize;
dc->reset = mips_cpc_reset;
dc->vmsd = &vmstate_mips_cpc;
- dc->props = mips_cpc_properties;
+ device_class_set_props(dc, mips_cpc_properties);
}
static const TypeInfo mips_cpc_info = {
@@ -503,7 +503,7 @@ static void mips_itu_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = mips_itu_properties;
+ device_class_set_props(dc, mips_itu_properties);
dc->realize = mips_itu_realize;
dc->reset = mips_itu_reset;
}
@@ -124,7 +124,7 @@ static void pvpanic_isa_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = pvpanic_isa_realizefn;
- dc->props = pvpanic_isa_properties;
+ device_class_set_props(dc, pvpanic_isa_properties);
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -514,7 +514,7 @@ static void aw_emac_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = aw_emac_realize;
- dc->props = aw_emac_properties;
+ device_class_set_props(dc, aw_emac_properties);
dc->reset = aw_emac_reset;
dc->vmsd = &vmstate_aw_emac;
}
@@ -1522,7 +1522,7 @@ static void gem_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = gem_realize;
- dc->props = gem_properties;
+ device_class_set_props(dc, gem_properties);
dc->vmsd = &vmstate_cadence_gem;
dc->reset = gem_reset;
}
@@ -891,7 +891,7 @@ static void dp8393x_class_init(ObjectClass *klass, void *data)
dc->realize = dp8393x_realize;
dc->reset = dp8393x_reset;
dc->vmsd = &vmstate_dp8393x;
- dc->props = dp8393x_properties;
+ device_class_set_props(dc, dp8393x_properties);
/* Reason: dma_mr property can't be set */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -1667,7 +1667,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;
+ device_class_set_props(dc, e1000_properties);
}
static void e1000_instance_init(Object *obj)
@@ -671,7 +671,7 @@ static void e1000e_class_init(ObjectClass *class, void *data)
dc->desc = "Intel 82574L GbE Controller";
dc->reset = e1000e_qdev_reset;
dc->vmsd = &e1000e_vmstate;
- dc->props = e1000e_properties;
+ device_class_set_props(dc, e1000e_properties);
e1000e_prop_disable_vnet = qdev_prop_uint8;
e1000e_prop_disable_vnet.description = "Do not use virtio headers, "
@@ -2081,7 +2081,7 @@ static void eepro100_class_init(ObjectClass *klass, void *data)
info = eepro100_get_class_by_name(object_class_get_name(klass));
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
- dc->props = e100_properties;
+ device_class_set_props(dc, e100_properties);
dc->desc = info->desc;
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->class_id = PCI_CLASS_NETWORK_ETHERNET;
@@ -628,7 +628,7 @@ static void etraxfs_eth_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = fs_eth_init;
- dc->props = etraxfs_eth_properties;
+ device_class_set_props(dc, etraxfs_eth_properties);
/* Reason: pointer properties "dma_out", "dma_in" */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -416,7 +416,7 @@ static void etsec_class_init(ObjectClass *klass, void *data)
dc->realize = etsec_realize;
dc->reset = etsec_reset;
- dc->props = etsec_properties;
+ device_class_set_props(dc, etsec_properties);
}
static TypeInfo etsec_info = {
@@ -1189,7 +1189,7 @@ static void imx_eth_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_imx_eth;
dc->reset = imx_eth_reset;
- dc->props = imx_eth_properties;
+ device_class_set_props(dc, imx_eth_properties);
dc->realize = imx_eth_realize;
dc->desc = "i.MX FEC/ENET Ethernet Controller";
}
@@ -1365,7 +1365,7 @@ static void lan9118_class_init(ObjectClass *klass, void *data)
k->init = lan9118_init1;
dc->reset = lan9118_reset;
- dc->props = lan9118_properties;
+ device_class_set_props(dc, lan9118_properties);
dc->vmsd = &vmstate_lan9118;
}
@@ -163,7 +163,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;
+ device_class_set_props(dc, lance_properties);
/* Reason: pointer property "dma" */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -526,7 +526,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;
+ device_class_set_props(dc, milkymist_minimac2_properties);
}
static const TypeInfo milkymist_minimac2_info = {
@@ -274,7 +274,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;
+ device_class_set_props(dc, mipsnet_properties);
}
static const TypeInfo mipsnet_info = {
@@ -90,7 +90,7 @@ static void isa_ne2000_class_initfn(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = isa_ne2000_realizefn;
- dc->props = ne2000_isa_properties;
+ device_class_set_props(dc, ne2000_isa_properties);
dc->vmsd = &vmstate_isa_ne2000;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
}
@@ -776,7 +776,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;
+ device_class_set_props(dc, ne2000_properties);
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
}
@@ -755,7 +755,7 @@ static void open_eth_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->desc = "Opencores 10/100 Mbit Ethernet";
dc->reset = qdev_open_eth_reset;
- dc->props = open_eth_properties;
+ device_class_set_props(dc, open_eth_properties);
}
static const TypeInfo open_eth_info = {
@@ -355,7 +355,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;
+ device_class_set_props(dc, pcnet_properties);
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
}
@@ -1565,7 +1565,7 @@ static void rocker_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->desc = "Rocker Switch";
dc->reset = rocker_reset;
- dc->props = rocker_properties;
+ device_class_set_props(dc, rocker_properties);
dc->vmsd = &rocker_vmsd;
}
@@ -3471,7 +3471,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;
+ device_class_set_props(dc, rtl8139_properties);
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
}
@@ -791,7 +791,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;
+ device_class_set_props(dc, smc91c111_properties);
}
static const TypeInfo smc91c111_info = {
@@ -849,7 +849,7 @@ static void spapr_vlan_class_init(ObjectClass *klass, void *data)
k->dt_compatible = "IBM,l-lan";
k->signal_mask = 0x1;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
- dc->props = spapr_vlan_properties;
+ device_class_set_props(dc, spapr_vlan_properties);
k->rtce_window_size = 0x10000000;
dc->vmsd = &vmstate_spapr_llan;
}
@@ -495,7 +495,7 @@ static void stellaris_enet_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = stellaris_enet_init;
- dc->props = stellaris_enet_properties;
+ device_class_set_props(dc, stellaris_enet_properties);
dc->vmsd = &vmstate_stellaris_enet;
}
@@ -1926,7 +1926,7 @@ static void virtio_net_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->props = virtio_net_properties;
+ device_class_set_props(dc, virtio_net_properties);
dc->vmsd = &vmstate_virtio_net;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
vdc->realize = virtio_net_device_realize;
@@ -2714,7 +2714,7 @@ static void vmxnet3_class_init(ObjectClass *class, void *data)
dc->desc = "VMWare Paravirtualized Ethernet v3";
dc->reset = vmxnet3_qdev_reset;
dc->vmsd = &vmstate_vmxnet3;
- dc->props = vmxnet3_properties;
+ device_class_set_props(dc, vmxnet3_properties);
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
}
@@ -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;
+ device_class_set_props(dc, xgmac_properties);
}
static const TypeInfo xgmac_enet_info = {
@@ -1031,7 +1031,7 @@ static void xilinx_enet_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = xilinx_enet_realize;
- dc->props = xilinx_enet_properties;
+ device_class_set_props(dc, xilinx_enet_properties);
dc->reset = xilinx_axienet_reset;
}
@@ -261,7 +261,7 @@ static void xilinx_ethlite_class_init(ObjectClass *klass, void *data)
dc->realize = xilinx_ethlite_realize;
dc->reset = xilinx_ethlite_reset;
- dc->props = xilinx_ethlite_properties;
+ device_class_set_props(dc, xilinx_ethlite_properties);
}
static const TypeInfo xilinx_ethlite_info = {
@@ -152,7 +152,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;
+ device_class_set_props(dc, nvram_sysbus_properties);
}
static const TypeInfo nvram_sysbus_info = {
@@ -1029,7 +1029,7 @@ static void fw_cfg_io_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = fw_cfg_io_realize;
- dc->props = fw_cfg_io_properties;
+ device_class_set_props(dc, fw_cfg_io_properties);
}
static const TypeInfo fw_cfg_io_info = {
@@ -1086,7 +1086,7 @@ static void fw_cfg_mem_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = fw_cfg_mem_realize;
- dc->props = fw_cfg_mem_properties;
+ device_class_set_props(dc, fw_cfg_mem_properties);
}
static const TypeInfo fw_cfg_mem_info = {
@@ -126,7 +126,7 @@ static void macio_nvram_class_init(ObjectClass *oc, void *data)
dc->unrealize = macio_nvram_unrealizefn;
dc->reset = macio_nvram_reset;
dc->vmsd = &vmstate_macio_nvram;
- dc->props = macio_nvram_properties;
+ device_class_set_props(dc, macio_nvram_properties);
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -240,7 +240,7 @@ static void spapr_nvram_class_init(ObjectClass *klass, void *data)
k->dt_type = "nvram";
k->dt_compatible = "qemu,spapr-nvram";
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
- dc->props = spapr_nvram_properties;
+ device_class_set_props(dc, spapr_nvram_properties);
dc->vmsd = &vmstate_spapr_nvram;
}
@@ -202,7 +202,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_props;
+ device_class_set_props(dc, ioh3420_props);
}
static const TypeInfo ioh3420_info = {
@@ -225,7 +225,7 @@ 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;
+ device_class_set_props(dc, pci_bridge_dev_properties);
dc->vmsd = &pci_bridge_dev_vmstate;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
hc->plug = pci_bridge_dev_hotplug_cb;
@@ -307,7 +307,7 @@ static void pxb_dev_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_BRIDGE_HOST;
dc->desc = "PCI Expander Bridge";
- dc->props = pxb_dev_properties;
+ device_class_set_props(dc, pxb_dev_properties);
dc->hotpluggable = false;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
}
@@ -341,7 +341,7 @@ static void pxb_pcie_dev_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_BRIDGE_HOST;
dc->desc = "PCI Express Expander Bridge";
- dc->props = pxb_dev_properties;
+ device_class_set_props(dc, pxb_dev_properties);
dc->hotpluggable = false;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
}
@@ -188,7 +188,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_props;
+ device_class_set_props(dc, xio3130_downstream_props);
}
static const TypeInfo xio3130_downstream_info = {
@@ -872,7 +872,7 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
hc->root_bus_path = i440fx_pcihost_root_bus_path;
dc->realize = i440fx_pcihost_realize;
dc->fw_name = "pci";
- dc->props = i440fx_props;
+ device_class_set_props(dc, i440fx_props);
/* Reason: needs to be wired up by pc_init1 */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -531,7 +531,7 @@ static void e500_pcihost_class_init(ObjectClass *klass, void *data)
k->init = e500_pcihost_initfn;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
- dc->props = pcihost_properties;
+ device_class_set_props(dc, pcihost_properties);
dc->vmsd = &vmstate_ppce500_pci;
}
@@ -386,7 +386,7 @@ static void raven_pcihost_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->realize = raven_pcihost_realizefn;
- dc->props = raven_pcihost_properties;
+ device_class_set_props(dc, raven_pcihost_properties);
dc->fw_name = "pci";
}
@@ -154,7 +154,7 @@ static void q35_host_class_init(ObjectClass *klass, void *data)
hc->root_bus_path = q35_host_root_bus_path;
dc->realize = q35_host_realize;
- dc->props = mch_props;
+ device_class_set_props(dc, mch_props);
/* Reason: needs to be wired up by pc_q35_init */
dc->cannot_instantiate_with_device_add_yet = true;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
@@ -502,7 +502,7 @@ static void pci_vpb_class_init(ObjectClass *klass, void *data)
dc->realize = pci_vpb_realize;
dc->reset = pci_vpb_reset;
dc->vmsd = &pci_vpb_vmstate;
- dc->props = pci_vpb_properties;
+ device_class_set_props(dc, pci_vpb_properties);
/* Reason: object_unref() hangs */
dc->cannot_destroy_with_object_finalize_yet = true;
}
@@ -2492,7 +2492,7 @@ static void pci_device_class_init(ObjectClass *klass, void *data)
k->realize = pci_qdev_realize;
k->unrealize = pci_qdev_unrealize;
k->bus_type = TYPE_PCI_BUS;
- k->props = pci_props;
+ device_class_set_props(k, pci_props);
pc->realize = pci_default_realize;
}
@@ -131,7 +131,7 @@ static void pcie_port_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
- dc->props = pcie_port_props;
+ device_class_set_props(dc, pcie_port_props);
}
static const TypeInfo pcie_port_type_info = {
@@ -153,7 +153,7 @@ static void pcie_slot_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
- dc->props = pcie_slot_props;
+ device_class_set_props(dc, pcie_slot_props);
hc->plug = pcie_cap_slot_hotplug_cb;
hc->unplug_request = pcie_cap_slot_hot_unplug_request_cb;
}
@@ -1690,7 +1690,7 @@ static void spapr_phb_class_init(ObjectClass *klass, void *data)
hc->root_bus_path = spapr_phb_root_bus_path;
dc->realize = spapr_phb_realize;
- dc->props = spapr_phb_properties;
+ device_class_set_props(dc, spapr_phb_properties);
dc->reset = spapr_phb_reset;
dc->vmsd = &vmstate_spapr_pci;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
@@ -223,7 +223,7 @@ static void spapr_phb_vfio_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = spapr_phb_vfio_properties;
+ device_class_set_props(dc, spapr_phb_vfio_properties);
}
static const TypeInfo spapr_phb_vfio_info = {
@@ -172,7 +172,7 @@ static void spapr_rng_class_init(ObjectClass *oc, void *data)
dc->realize = spapr_rng_realize;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
- dc->props = spapr_rng_properties;
+ device_class_set_props(dc, spapr_rng_properties);
dc->hotpluggable = false;
}
@@ -585,7 +585,7 @@ static void vio_spapr_device_class_init(ObjectClass *klass, void *data)
k->realize = spapr_vio_busdev_realize;
k->reset = spapr_vio_busdev_reset;
k->bus_type = TYPE_SPAPR_VIO_BUS;
- k->props = spapr_vio_props;
+ device_class_set_props(k, spapr_vio_props);
}
static const TypeInfo spapr_vio_type_info = {
@@ -125,7 +125,7 @@ static void virtual_css_bridge_class_init(ObjectClass *klass, void *data)
hc->unplug = ccw_device_unplug;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
- dc->props = virtual_css_bridge_properties;
+ device_class_set_props(dc, virtual_css_bridge_properties);
}
static const TypeInfo virtual_css_bridge_info = {
@@ -315,7 +315,7 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = s390_ipl_realize;
- dc->props = s390_ipl_properties;
+ device_class_set_props(dc, s390_ipl_properties);
dc->reset = s390_ipl_reset;
dc->vmsd = &vmstate_ipl;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
@@ -942,7 +942,7 @@ static void s390_pci_device_class_init(ObjectClass *klass, void *data)
dc->reset = s390_pci_device_reset;
dc->bus_type = TYPE_S390_PCI_BUS;
dc->realize = s390_pci_device_realize;
- dc->props = s390_pci_device_properties;
+ device_class_set_props(dc, s390_pci_device_properties);
}
static const TypeInfo s390_pci_device_info = {
@@ -1347,7 +1347,7 @@ static void virtio_ccw_net_class_init(ObjectClass *klass, void *data)
k->realize = virtio_ccw_net_realize;
k->exit = virtio_ccw_exit;
dc->reset = virtio_ccw_reset;
- dc->props = virtio_ccw_net_properties;
+ device_class_set_props(dc, virtio_ccw_net_properties);
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
}
@@ -1376,7 +1376,7 @@ static void virtio_ccw_blk_class_init(ObjectClass *klass, void *data)
k->realize = virtio_ccw_blk_realize;
k->exit = virtio_ccw_exit;
dc->reset = virtio_ccw_reset;
- dc->props = virtio_ccw_blk_properties;
+ device_class_set_props(dc, virtio_ccw_blk_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -1405,7 +1405,7 @@ static void virtio_ccw_serial_class_init(ObjectClass *klass, void *data)
k->realize = virtio_ccw_serial_realize;
k->exit = virtio_ccw_exit;
dc->reset = virtio_ccw_reset;
- dc->props = virtio_ccw_serial_properties;
+ device_class_set_props(dc, virtio_ccw_serial_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -1434,7 +1434,7 @@ static void virtio_ccw_balloon_class_init(ObjectClass *klass, void *data)
k->realize = virtio_ccw_balloon_realize;
k->exit = virtio_ccw_exit;
dc->reset = virtio_ccw_reset;
- dc->props = virtio_ccw_balloon_properties;
+ device_class_set_props(dc, virtio_ccw_balloon_properties);
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -1463,7 +1463,7 @@ static void virtio_ccw_scsi_class_init(ObjectClass *klass, void *data)
k->realize = virtio_ccw_scsi_realize;
k->exit = virtio_ccw_exit;
dc->reset = virtio_ccw_reset;
- dc->props = virtio_ccw_scsi_properties;
+ device_class_set_props(dc, virtio_ccw_scsi_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -1491,7 +1491,7 @@ static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data)
k->realize = vhost_ccw_scsi_realize;
k->exit = virtio_ccw_exit;
dc->reset = virtio_ccw_reset;
- dc->props = vhost_ccw_scsi_properties;
+ device_class_set_props(dc, vhost_ccw_scsi_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -1531,7 +1531,7 @@ static void virtio_ccw_rng_class_init(ObjectClass *klass, void *data)
k->realize = virtio_ccw_rng_realize;
k->exit = virtio_ccw_exit;
dc->reset = virtio_ccw_reset;
- dc->props = virtio_ccw_rng_properties;
+ device_class_set_props(dc, virtio_ccw_rng_properties);
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -1657,7 +1657,7 @@ static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data)
k->exit = virtio_ccw_exit;
k->realize = virtio_ccw_9p_realize;
dc->reset = virtio_ccw_reset;
- dc->props = virtio_ccw_9p_properties;
+ device_class_set_props(dc, virtio_ccw_9p_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -1708,7 +1708,7 @@ static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data)
k->realize = vhost_vsock_ccw_realize;
k->exit = virtio_ccw_exit;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
- dc->props = vhost_vsock_ccw_properties;
+ device_class_set_props(dc, vhost_vsock_ccw_properties);
dc->reset = virtio_ccw_reset;
}
@@ -2515,7 +2515,7 @@ static void megasas_class_init(ObjectClass *oc, void *data)
e->osts = info->osts;
e->product_name = info->product_name;
e->product_version = info->product_version;
- dc->props = info->props;
+ device_class_set_props(dc, info->props);
dc->reset = megasas_scsi_reset;
dc->vmsd = info->vmsd;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
@@ -1434,7 +1434,7 @@ static void mptsas1068_class_init(ObjectClass *oc, void *data)
pc->subsystem_vendor_id = PCI_VENDOR_ID_LSI_LOGIC;
pc->subsystem_id = 0x8000;
pc->class_id = PCI_CLASS_STORAGE_SCSI;
- dc->props = mptsas_properties;
+ device_class_set_props(dc, mptsas_properties);
dc->reset = mptsas_reset;
dc->vmsd = &vmstate_mptsas;
dc->desc = "LSI SAS 1068";
@@ -2069,7 +2069,7 @@ static void scsi_device_class_init(ObjectClass *klass, void *data)
k->bus_type = TYPE_SCSI_BUS;
k->realize = scsi_qdev_realize;
k->unrealize = scsi_qdev_unrealize;
- k->props = scsi_props;
+ device_class_set_props(k, scsi_props);
}
static void scsi_dev_instance_init(Object *obj)
@@ -2895,7 +2895,7 @@ static void scsi_hd_class_initfn(ObjectClass *klass, void *data)
sc->alloc_req = scsi_new_request;
sc->unit_attention_reported = scsi_disk_unit_attention_reported;
dc->desc = "virtual SCSI disk";
- dc->props = scsi_hd_properties;
+ device_class_set_props(dc, scsi_hd_properties);
dc->vmsd = &vmstate_scsi_disk_state;
}
@@ -2924,7 +2924,7 @@ static void scsi_cd_class_initfn(ObjectClass *klass, void *data)
sc->alloc_req = scsi_new_request;
sc->unit_attention_reported = scsi_disk_unit_attention_reported;
dc->desc = "virtual SCSI CD-ROM";
- dc->props = scsi_cd_properties;
+ device_class_set_props(dc, scsi_cd_properties);
dc->vmsd = &vmstate_scsi_disk_state;
}
@@ -2953,7 +2953,7 @@ static void scsi_block_class_initfn(ObjectClass *klass, void *data)
sdc->dma_writev = scsi_block_dma_writev;
sdc->need_fua_emulation = scsi_block_no_fua;
dc->desc = "SCSI block device passthrough";
- dc->props = scsi_block_properties;
+ device_class_set_props(dc, scsi_block_properties);
dc->vmsd = &vmstate_scsi_disk_state;
}
@@ -2991,7 +2991,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;
+ device_class_set_props(dc, scsi_disk_properties);
dc->vmsd = &vmstate_scsi_disk_state;
}
@@ -605,7 +605,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;
+ device_class_set_props(dc, scsi_generic_properties);
dc->vmsd = &vmstate_scsi_device;
}
@@ -1268,7 +1268,7 @@ static void spapr_vscsi_class_init(ObjectClass *klass, void *data)
k->dt_compatible = "IBM,v-scsi";
k->signal_mask = 0x00000001;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
- dc->props = spapr_vscsi_properties;
+ device_class_set_props(dc, spapr_vscsi_properties);
k->rtce_window_size = 0x10000000;
dc->vmsd = &vmstate_spapr_vscsi;
}
@@ -314,7 +314,7 @@ static void vhost_scsi_class_init(ObjectClass *klass, void *data)
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
FWPathProviderClass *fwc = FW_PATH_PROVIDER_CLASS(klass);
- dc->props = vhost_scsi_properties;
+ device_class_set_props(dc, vhost_scsi_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->realize = vhost_scsi_realize;
vdc->unrealize = vhost_scsi_unrealize;
@@ -949,7 +949,7 @@ static void virtio_scsi_class_init(ObjectClass *klass, void *data)
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass);
- dc->props = virtio_scsi_properties;
+ device_class_set_props(dc, virtio_scsi_properties);
dc->vmsd = &vmstate_virtio_scsi;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->realize = virtio_scsi_device_realize;
@@ -1292,7 +1292,7 @@ static void pvscsi_class_init(ObjectClass *klass, void *data)
dc->realize = pvscsi_realize;
dc->reset = pvscsi_reset;
dc->vmsd = &vmstate_pvscsi;
- dc->props = pvscsi_properties;
+ device_class_set_props(dc, pvscsi_properties);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
hc->unplug = pvscsi_hot_unplug;
hc->plug = pvscsi_hotplug;
@@ -1914,7 +1914,7 @@ static void sd_class_init(ObjectClass *klass, void *data)
SDCardClass *sc = SD_CARD_CLASS(klass);
dc->realize = sd_realize;
- dc->props = sd_properties;
+ device_class_set_props(dc, sd_properties);
dc->vmsd = &sd_vmstate;
dc->reset = sd_reset;
dc->bus_type = TYPE_SD_BUS;
@@ -1305,7 +1305,7 @@ static void sdhci_pci_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_SYSTEM_SDHCI;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->vmsd = &sdhci_vmstate;
- dc->props = sdhci_pci_properties;
+ device_class_set_props(dc, sdhci_pci_properties);
dc->reset = sdhci_poweron_reset;
}
@@ -1356,7 +1356,7 @@ static void sdhci_sysbus_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &sdhci_vmstate;
- dc->props = sdhci_sysbus_properties;
+ device_class_set_props(dc, sdhci_sysbus_properties);
dc->realize = sdhci_sysbus_realize;
dc->reset = sdhci_poweron_reset;
}
@@ -749,7 +749,7 @@ static void prom_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = prom_init1;
- dc->props = prom_properties;
+ device_class_set_props(dc, prom_properties);
}
static const TypeInfo prom_info = {
@@ -816,7 +816,7 @@ static void ram_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = ram_init1;
- dc->props = ram_properties;
+ device_class_set_props(dc, ram_properties);
}
static const TypeInfo ram_info = {
@@ -673,7 +673,7 @@ static void prom_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = prom_init1;
- dc->props = prom_properties;
+ device_class_set_props(dc, prom_properties);
}
static const TypeInfo prom_info = {
@@ -734,7 +734,7 @@ static void ram_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = ram_init1;
- dc->props = ram_properties;
+ device_class_set_props(dc, ram_properties);
}
static const TypeInfo ram_info = {
@@ -605,7 +605,7 @@ static void aspeed_smc_class_init(ObjectClass *klass, void *data)
dc->realize = aspeed_smc_realize;
dc->reset = aspeed_smc_reset;
- dc->props = aspeed_smc_properties;
+ device_class_set_props(dc, aspeed_smc_properties);
dc->vmsd = &vmstate_aspeed_smc;
mc->ctrl = data;
}
@@ -372,7 +372,7 @@ static void xilinx_spi_class_init(ObjectClass *klass, void *data)
k->init = xilinx_spi_init;
dc->reset = xlx_spi_reset;
- dc->props = xilinx_spi_properties;
+ device_class_set_props(dc, xilinx_spi_properties);
dc->vmsd = &vmstate_xilinx_spi;
}
@@ -702,7 +702,7 @@ static void xilinx_spips_class_init(ObjectClass *klass, void *data)
dc->realize = xilinx_spips_realize;
dc->reset = xilinx_spips_reset;
- dc->props = xilinx_spips_properties;
+ device_class_set_props(dc, xilinx_spips_properties);
dc->vmsd = &vmstate_xilinx_spips;
xsc->reg_ops = &spips_ops;
@@ -354,7 +354,7 @@ static void a9_gtimer_class_init(ObjectClass *klass, void *data)
dc->realize = a9_gtimer_realize;
dc->vmsd = &vmstate_a9_gtimer;
dc->reset = a9_gtimer_reset;
- dc->props = a9_gtimer_properties;
+ device_class_set_props(dc, a9_gtimer_properties);
}
static const TypeInfo a9_gtimer_info = {
@@ -276,7 +276,7 @@ static void a10_pit_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = a10_pit_reset;
- dc->props = a10_pit_properties;
+ device_class_set_props(dc, a10_pit_properties);
dc->desc = "allwinner a10 timer";
dc->vmsd = &vmstate_a10_pit;
}
@@ -284,7 +284,7 @@ static void arm_mptimer_class_init(ObjectClass *klass, void *data)
dc->realize = arm_mptimer_realize;
dc->vmsd = &vmstate_arm_mptimer;
dc->reset = arm_mptimer_reset;
- dc->props = arm_mptimer_properties;
+ device_class_set_props(dc, arm_mptimer_properties);
}
static const TypeInfo arm_mptimer_info = {
@@ -389,7 +389,7 @@ static void sp804_class_init(ObjectClass *klass, void *data)
DeviceClass *k = DEVICE_CLASS(klass);
k->realize = sp804_realize;
- k->props = sp804_properties;
+ device_class_set_props(k, sp804_properties);
k->vmsd = &vmstate_sp804;
}
@@ -394,7 +394,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;
+ device_class_set_props(dc, grlib_gptimer_properties);
}
static const TypeInfo grlib_gptimer_info = {
@@ -770,7 +770,7 @@ static void hpet_device_class_init(ObjectClass *klass, void *data)
dc->realize = hpet_realize;
dc->reset = hpet_reset;
dc->vmsd = &vmstate_hpet;
- dc->props = hpet_device_properties;
+ device_class_set_props(dc, hpet_device_properties);
}
static const TypeInfo hpet_device_info = {
@@ -365,7 +365,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;
+ device_class_set_props(dc, pit_properties);
}
static const TypeInfo pit_info = {
@@ -222,7 +222,7 @@ static void lm32_timer_class_init(ObjectClass *klass, void *data)
dc->realize = lm32_timer_realize;
dc->reset = timer_reset;
dc->vmsd = &vmstate_lm32_timer;
- dc->props = lm32_timer_properties;
+ device_class_set_props(dc, lm32_timer_properties);
}
static const TypeInfo lm32_timer_info = {
@@ -822,7 +822,7 @@ static void m48txx_isa_class_init(ObjectClass *klass, void *data)
dc->realize = m48t59_isa_realize;
dc->reset = m48t59_reset_isa;
- dc->props = m48t59_isa_properties;
+ device_class_set_props(dc, m48t59_isa_properties);
nc->read = m48txx_isa_read;
nc->write = m48txx_isa_write;
nc->toggle_lock = m48txx_isa_toggle_lock;
@@ -867,7 +867,7 @@ static void m48txx_sysbus_class_init(ObjectClass *klass, void *data)
k->init = m48t59_init1;
dc->reset = m48t59_reset_sysbus;
- dc->props = m48t59_sysbus_properties;
+ device_class_set_props(dc, m48t59_sysbus_properties);
nc->read = m48txx_sysbus_read;
nc->write = m48txx_sysbus_write;
nc->toggle_lock = m48txx_sysbus_toggle_lock;
@@ -952,7 +952,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data)
dc->realize = rtc_realizefn;
dc->vmsd = &vmstate_rtc;
- dc->props = mc146818rtc_properties;
+ device_class_set_props(dc, mc146818rtc_properties);
/* Reason: needs to be wired up by rtc_init() */
dc->cannot_instantiate_with_device_add_yet = true;
}
@@ -328,7 +328,7 @@ static void milkymist_sysctl_class_init(ObjectClass *klass, void *data)
dc->realize = milkymist_sysctl_realize;
dc->reset = milkymist_sysctl_reset;
dc->vmsd = &vmstate_milkymist_sysctl;
- dc->props = milkymist_sysctl_properties;
+ device_class_set_props(dc, milkymist_sysctl_properties);
}
static const TypeInfo milkymist_sysctl_info = {
@@ -546,7 +546,7 @@ static void pxa25x_timer_dev_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->desc = "PXA25x timer";
- dc->props = pxa25x_timer_dev_properties;
+ device_class_set_props(dc, pxa25x_timer_dev_properties);
}
static const TypeInfo pxa25x_timer_dev_info = {
@@ -568,7 +568,7 @@ static void pxa27x_timer_dev_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->desc = "PXA27x timer";
- dc->props = pxa27x_timer_dev_properties;
+ device_class_set_props(dc, pxa27x_timer_dev_properties);
}
static const TypeInfo pxa27x_timer_dev_info = {
@@ -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;
+ device_class_set_props(dc, slavio_timer_properties);
}
static const TypeInfo slavio_timer_info = {
@@ -319,7 +319,7 @@ static void stm32f2xx_timer_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = stm32f2xx_timer_reset;
- dc->props = stm32f2xx_timer_properties;
+ device_class_set_props(dc, stm32f2xx_timer_properties);
dc->vmsd = &vmstate_stm32f2xx_timer;
}
@@ -247,7 +247,7 @@ static void xilinx_timer_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = xilinx_timer_realize;
- dc->props = xilinx_timer_properties;
+ device_class_set_props(dc, xilinx_timer_properties);
}
static const TypeInfo xilinx_timer_info = {
@@ -1079,7 +1079,7 @@ static void tpm_tis_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = tpm_tis_realizefn;
- dc->props = tpm_tis_properties;
+ device_class_set_props(dc, tpm_tis_properties);
dc->reset = tpm_tis_reset;
dc->vmsd = &vmstate_tpm_tis;
}
@@ -791,7 +791,7 @@ static void usb_device_class_init(ObjectClass *klass, void *data)
k->bus_type = TYPE_USB_BUS;
k->realize = usb_qdev_realize;
k->unrealize = usb_qdev_unrealize;
- k->props = usb_props;
+ device_class_set_props(k, usb_props);
}
static const TypeInfo usb_device_type_info = {
@@ -588,7 +588,7 @@ static void emulated_class_initfn(ObjectClass *klass, void *data)
cc->apdu_from_guest = emulated_apdu_from_guest;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
dc->desc = "emulated smartcard";
- dc->props = emulated_card_properties;
+ device_class_set_props(dc, emulated_card_properties);
}
static const TypeInfo emulated_card_info = {
@@ -401,7 +401,7 @@ static void passthru_class_initfn(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
dc->desc = "passthrough smartcard";
dc->vmsd = &passthru_vmstate;
- dc->props = passthru_card_properties;
+ device_class_set_props(dc, passthru_card_properties);
}
static const TypeInfo passthru_card_info = {
@@ -675,7 +675,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;
+ device_class_set_props(dc, usb_audio_properties);
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
k->product_desc = "QEMU USB Audio Interface";
k->usb_desc = &desc_audio;
@@ -812,7 +812,7 @@ static void usb_tablet_class_initfn(ObjectClass *klass, void *data)
uc->realize = usb_tablet_realize;
uc->product_desc = "QEMU USB Tablet";
dc->vmsd = &vmstate_usb_ptr;
- dc->props = usb_tablet_properties;
+ device_class_set_props(dc, usb_tablet_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -835,7 +835,7 @@ static void usb_mouse_class_initfn(ObjectClass *klass, void *data)
uc->realize = usb_mouse_realize;
uc->product_desc = "QEMU USB Mouse";
dc->vmsd = &vmstate_usb_ptr;
- dc->props = usb_mouse_properties;
+ device_class_set_props(dc, usb_mouse_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -859,7 +859,7 @@ static void usb_keyboard_class_initfn(ObjectClass *klass, void *data)
uc->realize = usb_keyboard_realize;
uc->product_desc = "QEMU USB Keyboard";
dc->vmsd = &vmstate_usb_kbd;
- dc->props = usb_keyboard_properties;
+ device_class_set_props(dc, usb_keyboard_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -1583,7 +1583,7 @@ static void usb_mtp_class_initfn(ObjectClass *klass, void *data)
uc->handle_data = usb_mtp_handle_data;
dc->fw_name = "mtp";
dc->vmsd = &vmstate_usb_mtp;
- dc->props = mtp_properties;
+ device_class_set_props(dc, mtp_properties);
}
static TypeInfo mtp_info = {
@@ -1432,7 +1432,7 @@ static void usb_net_class_initfn(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->fw_name = "network";
dc->vmsd = &vmstate_usb_net;
- dc->props = net_properties;
+ device_class_set_props(dc, net_properties);
}
static const TypeInfo net_info = {
@@ -612,7 +612,7 @@ static void usb_serial_class_initfn(ObjectClass *klass, void *data)
uc->product_desc = "QEMU USB Serial";
uc->usb_desc = &desc_serial;
- dc->props = serial_properties;
+ device_class_set_props(dc, serial_properties);
}
static const TypeInfo serial_info = {
@@ -633,7 +633,7 @@ static void usb_braille_class_initfn(ObjectClass *klass, void *data)
uc->product_desc = "QEMU USB Braille";
uc->usb_desc = &desc_braille;
- dc->props = braille_properties;
+ device_class_set_props(dc, braille_properties);
}
static const TypeInfo braille_info = {
@@ -1462,7 +1462,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;
+ device_class_set_props(dc, ccid_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
hc->unplug = qdev_simple_device_unplug_cb;
}
@@ -1484,7 +1484,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;
+ device_class_set_props(k, ccid_props);
}
static const TypeInfo ccid_card_type_info = {
@@ -755,7 +755,7 @@ static void usb_msd_class_initfn_storage(ObjectClass *klass, void *data)
USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
uc->realize = usb_msd_realize_storage;
- dc->props = msd_properties;
+ device_class_set_props(dc, msd_properties);
}
static void usb_msd_get_bootindex(Object *obj, Visitor *v, const char *name,
@@ -948,7 +948,7 @@ static void usb_uas_class_initfn(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->fw_name = "storage";
dc->vmsd = &vmstate_usb_uas;
- dc->props = uas_properties;
+ device_class_set_props(dc, uas_properties);
}
static const TypeInfo uas_info = {
@@ -150,7 +150,7 @@ static void ehci_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_SERIAL_USB;
k->config_write = usb_ehci_pci_write_config;
dc->vmsd = &vmstate_ehci_pci;
- dc->props = ehci_pci_properties;
+ device_class_set_props(dc, ehci_pci_properties);
dc->reset = usb_ehci_pci_reset;
}
@@ -79,7 +79,7 @@ static void ehci_sysbus_class_init(ObjectClass *klass, void *data)
dc->realize = usb_ehci_sysbus_realize;
dc->vmsd = &vmstate_ehci_sysbus;
- dc->props = ehci_sysbus_properties;
+ device_class_set_props(dc, ehci_sysbus_properties);
dc->reset = usb_ehci_sysbus_reset;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
}
@@ -2124,7 +2124,7 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_SERIAL_USB;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
dc->desc = "Apple USB Controller";
- dc->props = ohci_pci_properties;
+ device_class_set_props(dc, ohci_pci_properties);
dc->hotpluggable = false;
dc->vmsd = &vmstate_ohci;
dc->reset = usb_ohci_reset_pci;
@@ -2150,7 +2150,7 @@ static void ohci_sysbus_class_init(ObjectClass *klass, void *data)
dc->realize = ohci_realize_pxa;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
dc->desc = "OHCI USB Controller";
- dc->props = ohci_sysbus_properties;
+ device_class_set_props(dc, ohci_sysbus_properties);
dc->reset = usb_ohci_reset_sysbus;
}
@@ -1340,9 +1340,9 @@ static void uhci_data_class_init(ObjectClass *klass, void *data)
if (!info->unplug) {
/* uhci controllers in companion setups can't be hotplugged */
dc->hotpluggable = false;
- dc->props = uhci_properties_companion;
+ device_class_set_props(dc, uhci_properties_companion);
} else {
- dc->props = uhci_properties_standalone;
+ device_class_set_props(dc, uhci_properties_standalone);
}
u->info = *info;
}
@@ -3945,7 +3945,7 @@ static void xhci_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &vmstate_xhci;
- dc->props = xhci_properties;
+ device_class_set_props(dc, xhci_properties);
dc->reset = xhci_reset;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
k->realize = usb_xhci_realize;
@@ -1573,7 +1573,7 @@ static void usb_host_class_initfn(ObjectClass *klass, void *data)
uc->alloc_streams = usb_host_alloc_streams;
uc->free_streams = usb_host_free_streams;
dc->vmsd = &vmstate_usb_host;
- dc->props = usb_host_dev_properties;
+ device_class_set_props(dc, usb_host_dev_properties);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
}
@@ -2504,7 +2504,7 @@ static void usbredir_class_initfn(ObjectClass *klass, void *data)
uc->alloc_streams = usbredir_alloc_streams;
uc->free_streams = usbredir_free_streams;
dc->vmsd = &usbredir_vmstate;
- dc->props = usbredir_properties;
+ device_class_set_props(dc, usbredir_properties);
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -2886,7 +2886,7 @@ static void vfio_pci_dev_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *pdc = PCI_DEVICE_CLASS(klass);
dc->reset = vfio_pci_reset;
- dc->props = vfio_pci_dev_properties;
+ device_class_set_props(dc, vfio_pci_dev_properties);
dc->vmsd = &vfio_pci_vmstate;
dc->desc = "VFIO-based PCI device assignment";
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
@@ -691,7 +691,7 @@ static void vfio_platform_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);
dc->realize = vfio_platform_realize;
- dc->props = vfio_platform_dev_properties;
+ device_class_set_props(dc, vfio_platform_dev_properties);
dc->vmsd = &vfio_platform_vmstate;
dc->desc = "VFIO-based platform device assignment";
sbc->connect_irq_notifier = vfio_start_irqfd_injection;
@@ -390,7 +390,7 @@ static void vhost_vsock_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->props = vhost_vsock_properties;
+ device_class_set_props(dc, vhost_vsock_properties);
dc->vmsd = &vmstate_virtio_vhost_vsock;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
vdc->realize = vhost_vsock_device_realize;
@@ -508,7 +508,7 @@ static void virtio_balloon_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->props = virtio_balloon_properties;
+ device_class_set_props(dc, virtio_balloon_properties);
dc->vmsd = &vmstate_virtio_balloon;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
vdc->realize = virtio_balloon_device_realize;
@@ -496,7 +496,7 @@ static void virtio_mmio_class_init(ObjectClass *klass, void *data)
dc->realize = virtio_mmio_realizefn;
dc->reset = virtio_mmio_reset;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
- dc->props = virtio_mmio_properties;
+ device_class_set_props(dc, virtio_mmio_properties);
}
static const TypeInfo virtio_mmio_info = {
@@ -1137,7 +1137,7 @@ static void virtio_9p_pci_class_init(ObjectClass *klass, void *data)
pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
pcidev_k->class_id = 0x2;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
- dc->props = virtio_9p_pci_properties;
+ device_class_set_props(dc, virtio_9p_pci_properties);
}
static void virtio_9p_pci_instance_init(Object *obj)
@@ -1899,7 +1899,7 @@ static void virtio_pci_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
VirtioPCIClass *vpciklass = VIRTIO_PCI_CLASS(klass);
- dc->props = virtio_pci_properties;
+ device_class_set_props(dc, virtio_pci_properties);
k->realize = virtio_pci_realize;
k->exit = virtio_pci_exit;
k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
@@ -1945,7 +1945,7 @@ static void virtio_blk_pci_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
- dc->props = virtio_blk_pci_properties;
+ device_class_set_props(dc, virtio_blk_pci_properties);
k->realize = virtio_blk_pci_realize;
pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BLOCK;
@@ -2017,7 +2017,7 @@ static void virtio_scsi_pci_class_init(ObjectClass *klass, void *data)
k->realize = virtio_scsi_pci_realize;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
- dc->props = virtio_scsi_pci_properties;
+ device_class_set_props(dc, virtio_scsi_pci_properties);
pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_SCSI;
pcidev_k->revision = 0x00;
@@ -2072,7 +2072,7 @@ static void vhost_scsi_pci_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
k->realize = vhost_scsi_pci_realize;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
- dc->props = vhost_scsi_pci_properties;
+ device_class_set_props(dc, vhost_scsi_pci_properties);
pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_SCSI;
pcidev_k->revision = 0x00;
@@ -2122,7 +2122,7 @@ static void vhost_vsock_pci_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
k->realize = vhost_vsock_pci_realize;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
- dc->props = vhost_vsock_pci_properties;
+ device_class_set_props(dc, vhost_vsock_pci_properties);
pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_VSOCK;
pcidev_k->revision = 0x00;
@@ -2174,7 +2174,7 @@ static void virtio_balloon_pci_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
k->realize = virtio_balloon_pci_realize;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
- dc->props = virtio_balloon_pci_properties;
+ device_class_set_props(dc, virtio_balloon_pci_properties);
pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BALLOON;
pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
@@ -2252,7 +2252,7 @@ static void virtio_serial_pci_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
k->realize = virtio_serial_pci_realize;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
- dc->props = virtio_serial_pci_properties;
+ device_class_set_props(dc, virtio_serial_pci_properties);
pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_CONSOLE;
pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
@@ -2308,7 +2308,7 @@ static void virtio_net_pci_class_init(ObjectClass *klass, void *data)
k->revision = VIRTIO_PCI_ABI_VERSION;
k->class_id = PCI_CLASS_NETWORK_ETHERNET;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
- dc->props = virtio_net_properties;
+ device_class_set_props(dc, virtio_net_properties);
vpciklass->realize = virtio_net_pci_realize;
}
@@ -2406,7 +2406,7 @@ static void virtio_input_pci_class_init(ObjectClass *klass, void *data)
VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
- dc->props = virtio_input_pci_properties;
+ device_class_set_props(dc, virtio_input_pci_properties);
k->realize = virtio_input_pci_realize;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
@@ -237,7 +237,7 @@ static void virtio_rng_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->props = virtio_rng_properties;
+ device_class_set_props(dc, virtio_rng_properties);
dc->vmsd = &vmstate_virtio_rng;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
vdc->realize = virtio_rng_device_realize;
@@ -2166,7 +2166,7 @@ static void virtio_device_class_init(ObjectClass *klass, void *data)
dc->realize = virtio_device_realize;
dc->unrealize = virtio_device_unrealize;
dc->bus_type = TYPE_VIRTIO_BUS;
- dc->props = virtio_properties;
+ device_class_set_props(dc, virtio_properties);
}
static const TypeInfo virtio_device_info = {
@@ -877,7 +877,7 @@ static void xen_sysdev_class_init(ObjectClass *klass, void *data)
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = xen_sysdev_init;
- dc->props = xen_sysdev_properties;
+ device_class_set_props(dc, xen_sysdev_properties);
}
static const TypeInfo xensysdev_info = {
@@ -948,7 +948,7 @@ static void xen_pci_passthrough_class_init(ObjectClass *klass, void *data)
k->config_write = xen_pt_pci_write_config;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->desc = "Assign an host PCI device with Xen";
- dc->props = xen_pci_passthrough_properties;
+ device_class_set_props(dc, xen_pci_passthrough_properties);
};
static void xen_pci_passthrough_finalize(Object *obj)
@@ -401,6 +401,12 @@ static inline bool qbus_is_hotpluggable(BusState *bus)
return bus->hotplug_handler;
}
+/* Set list of static properties for class
+ *
+ * It can be called only once per class.
+ */
+void device_class_set_props(DeviceClass *dc, Property *props);
+
void device_listener_register(DeviceListener *listener);
void device_listener_unregister(DeviceListener *listener);
@@ -1501,7 +1501,7 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
acc->parent_realize = dc->realize;
dc->realize = arm_cpu_realizefn;
- dc->props = arm_cpu_properties;
+ device_class_set_props(dc, arm_cpu_properties);
acc->parent_reset = cc->reset;
cc->reset = arm_cpu_reset;
@@ -1579,7 +1579,7 @@ static void host_x86_cpu_class_init(ObjectClass *oc, void *data)
* instance_init, because they require KVM to be initialized.
*/
- dc->props = host_x86_cpu_properties;
+ device_class_set_props(dc, host_x86_cpu_properties);
/* Reason: host_x86_cpu_initfn() dies when !kvm_enabled() */
dc->cannot_destroy_with_object_finalize_yet = true;
}
@@ -3638,7 +3638,7 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
xcc->parent_realize = dc->realize;
dc->realize = x86_cpu_realizefn;
dc->unrealize = x86_cpu_unrealizefn;
- dc->props = x86_cpu_properties;
+ device_class_set_props(dc, x86_cpu_properties);
xcc->parent_reset = cc->reset;
cc->reset = x86_cpu_reset;
@@ -263,7 +263,7 @@ static void mb_cpu_class_init(ObjectClass *oc, void *data)
cc->get_phys_page_debug = mb_cpu_get_phys_page_debug;
#endif
dc->vmsd = &vmstate_mb_cpu;
- dc->props = mb_properties;
+ device_class_set_props(dc, mb_properties);
cc->gdb_num_core_regs = 32 + 5;
cc->disas_set_info = mb_disas_set_info;
@@ -8586,7 +8586,7 @@ POWERPC_FAMILY(POWER7)(ObjectClass *oc, void *data)
dc->fw_name = "PowerPC,POWER7";
dc->desc = "POWER7";
- dc->props = powerpc_servercpu_properties;
+ device_class_set_props(dc, powerpc_servercpu_properties);
pcc->pvr_match = ppc_pvr_match_power7;
pcc->pcr_mask = PCR_VEC_DIS | PCR_VSX_DIS | PCR_COMPAT_2_05;
pcc->pcr_supported = PCR_COMPAT_2_06 | PCR_COMPAT_2_05;
@@ -8713,7 +8713,7 @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data)
dc->fw_name = "PowerPC,POWER8";
dc->desc = "POWER8";
- dc->props = powerpc_servercpu_properties;
+ device_class_set_props(dc, powerpc_servercpu_properties);
pcc->pvr_match = ppc_pvr_match_power8;
pcc->pcr_mask = PCR_TM_DIS | PCR_COMPAT_2_06 | PCR_COMPAT_2_05;
pcc->pcr_supported = PCR_COMPAT_2_07 | PCR_COMPAT_2_06 | PCR_COMPAT_2_05;
@@ -8794,7 +8794,7 @@ POWERPC_FAMILY(POWER9)(ObjectClass *oc, void *data)
dc->fw_name = "PowerPC,POWER9";
dc->desc = "POWER9";
- dc->props = powerpc_servercpu_properties;
+ device_class_set_props(dc, powerpc_servercpu_properties);
pcc->pvr_match = ppc_pvr_match_power9;
pcc->pcr_mask = PCR_COMPAT_2_05 | PCR_COMPAT_2_06 | PCR_COMPAT_2_07;
pcc->init_proc = init_proc_POWER9;
@@ -53,7 +53,7 @@ static void static_prop_class_init(ObjectClass *oc, void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = NULL;
- dc->props = static_props;
+ device_class_set_props(dc, static_props);
}
static const TypeInfo static_prop_type = {
Replace direct assignment of DeviceClass::props with a device_class_set_props() function. The new function will handle registration of class properties, later. Except for manual conversion of target-ppc/translate_init.c, the existing code was converted using the following Coccinelle patch: @@ identifier DC; expression PROPS; typedef DeviceClass; @@ DeviceClass *DC; ... -DC->props = PROPS; +device_class_set_props(DC, PROPS); Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- Changes v1 -> v2: * s/qdev_class_set_props/device_class_set_props/ * Suggested-by: Andreas Färber <afaerber@suse.de> --- hw/9pfs/virtio-9p-device.c | 2 +- hw/acpi/piix4.c | 2 +- hw/arm/armv7m.c | 2 +- hw/arm/bcm2836.c | 2 +- hw/arm/integratorcp.c | 2 +- hw/arm/musicpal.c | 2 +- hw/arm/pxa2xx.c | 4 ++-- hw/arm/pxa2xx_gpio.c | 2 +- hw/arm/spitz.c | 2 +- hw/arm/stm32f205_soc.c | 2 +- hw/arm/strongarm.c | 2 +- hw/arm/xlnx-zynqmp.c | 2 +- hw/audio/ac97.c | 2 +- hw/audio/adlib.c | 2 +- hw/audio/cs4231.c | 2 +- hw/audio/cs4231a.c | 2 +- hw/audio/gus.c | 2 +- hw/audio/hda-codec.c | 2 +- hw/audio/intel-hda.c | 4 ++-- hw/audio/marvell_88w8618.c | 2 +- hw/audio/pcspk.c | 2 +- hw/audio/pl041.c | 2 +- hw/audio/sb16.c | 2 +- hw/block/fdc.c | 6 +++--- hw/block/m25p80.c | 2 +- hw/block/nand.c | 2 +- hw/block/nvme.c | 2 +- hw/block/onenand.c | 2 +- hw/block/pflash_cfi01.c | 2 +- hw/block/pflash_cfi02.c | 2 +- hw/block/virtio-blk.c | 2 +- hw/char/bcm2835_aux.c | 2 +- hw/char/cadence_uart.c | 2 +- hw/char/debugcon.c | 2 +- hw/char/digic-uart.c | 2 +- hw/char/escc.c | 2 +- hw/char/etraxfs_ser.c | 2 +- hw/char/exynos4210_uart.c | 2 +- hw/char/grlib_apbuart.c | 2 +- hw/char/imx_serial.c | 2 +- hw/char/ipoctal232.c | 2 +- hw/char/lm32_juart.c | 2 +- hw/char/lm32_uart.c | 2 +- hw/char/milkymist-uart.c | 2 +- hw/char/parallel.c | 2 +- hw/char/pl011.c | 2 +- hw/char/sclpconsole-lm.c | 2 +- hw/char/sclpconsole.c | 2 +- hw/char/serial-isa.c | 2 +- hw/char/serial-pci.c | 6 +++--- hw/char/spapr_vty.c | 2 +- hw/char/stm32f2xx_usart.c | 2 +- hw/char/virtio-console.c | 2 +- hw/char/virtio-serial-bus.c | 4 ++-- hw/char/xilinx_uartlite.c | 2 +- hw/core/generic-loader.c | 2 +- hw/core/or-irq.c | 2 +- hw/core/platform-bus.c | 2 +- hw/core/qdev.c | 6 ++++++ hw/cpu/a15mpcore.c | 2 +- hw/cpu/a9mpcore.c | 2 +- hw/cpu/arm11mpcore.c | 2 +- hw/cpu/realview_mpcore.c | 2 +- hw/display/bcm2835_fb.c | 2 +- hw/display/cg3.c | 2 +- hw/display/cirrus_vga.c | 4 ++-- hw/display/g364fb.c | 2 +- hw/display/milkymist-vgafb.c | 2 +- hw/display/qxl.c | 2 +- hw/display/tcx.c | 2 +- hw/display/vga-isa.c | 2 +- hw/display/vga-pci.c | 4 ++-- hw/display/virtio-gpu-pci.c | 2 +- hw/display/virtio-gpu.c | 2 +- hw/display/virtio-vga.c | 2 +- hw/display/vmware_vga.c | 2 +- hw/dma/i82374.c | 2 +- hw/dma/i8257.c | 2 +- hw/dma/pl330.c | 2 +- hw/dma/pxa2xx_dma.c | 2 +- hw/dma/sparc32_dma.c | 2 +- hw/dma/sun4m_iommu.c | 2 +- hw/dma/xilinx_axidma.c | 2 +- hw/gpio/imx_gpio.c | 2 +- hw/gpio/omap_gpio.c | 4 ++-- hw/i2c/core.c | 2 +- hw/i2c/omap_i2c.c | 2 +- hw/i2c/smbus_eeprom.c | 2 +- hw/i386/intel_iommu.c | 2 +- hw/i386/kvm/i8254.c | 2 +- hw/i386/kvm/ioapic.c | 2 +- hw/i386/kvm/pci-assign.c | 2 +- hw/i386/xen/xen_pvdevice.c | 2 +- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/mmio.c | 2 +- hw/ide/qdev.c | 8 ++++---- hw/input/milkymist-softusb.c | 2 +- hw/input/virtio-input-hid.c | 2 +- hw/input/virtio-input-host.c | 2 +- hw/input/virtio-input.c | 2 +- hw/input/vmmouse.c | 2 +- hw/intc/apic_common.c | 2 +- hw/intc/arm_gic_common.c | 2 +- hw/intc/arm_gicv2m.c | 2 +- hw/intc/arm_gicv3_common.c | 2 +- hw/intc/etraxfs_pic.c | 2 +- hw/intc/exynos4210_combiner.c | 2 +- hw/intc/exynos4210_gic.c | 4 ++-- hw/intc/grlib_irqmp.c | 2 +- hw/intc/i8259_common.c | 2 +- hw/intc/ioapic.c | 2 +- hw/intc/mips_gic.c | 2 +- hw/intc/omap_intc.c | 4 ++-- hw/intc/openpic.c | 2 +- hw/intc/openpic_kvm.c | 2 +- hw/intc/xilinx_intc.c | 2 +- hw/ipack/ipack.c | 2 +- hw/ipmi/ipmi.c | 2 +- hw/ipmi/ipmi_bmc_extern.c | 2 +- hw/ipmi/isa_ipmi_bt.c | 2 +- hw/ipmi/isa_ipmi_kcs.c | 2 +- hw/isa/lpc_ich9.c | 2 +- hw/isa/pc87312.c | 2 +- hw/isa/vt82c686.c | 2 +- hw/mem/pc-dimm.c | 2 +- hw/mips/cps.c | 2 +- hw/misc/a9scu.c | 2 +- hw/misc/applesmc.c | 2 +- hw/misc/arm11scu.c | 2 +- hw/misc/arm_l2x0.c | 2 +- hw/misc/arm_sysctl.c | 2 +- hw/misc/aspeed_scu.c | 2 +- hw/misc/aspeed_sdmc.c | 2 +- hw/misc/bcm2835_property.c | 2 +- hw/misc/debugexit.c | 2 +- hw/misc/eccmemctl.c | 2 +- hw/misc/ivshmem.c | 6 +++--- hw/misc/macio/cuda.c | 2 +- hw/misc/macio/macio.c | 2 +- hw/misc/mips_cmgcr.c | 2 +- hw/misc/mips_cpc.c | 2 +- hw/misc/mips_itu.c | 2 +- hw/misc/pvpanic.c | 2 +- hw/net/allwinner_emac.c | 2 +- hw/net/cadence_gem.c | 2 +- hw/net/dp8393x.c | 2 +- hw/net/e1000.c | 2 +- hw/net/e1000e.c | 2 +- hw/net/eepro100.c | 2 +- hw/net/etraxfs_eth.c | 2 +- hw/net/fsl_etsec/etsec.c | 2 +- hw/net/imx_fec.c | 2 +- hw/net/lan9118.c | 2 +- hw/net/lance.c | 2 +- hw/net/milkymist-minimac2.c | 2 +- hw/net/mipsnet.c | 2 +- hw/net/ne2000-isa.c | 2 +- hw/net/ne2000.c | 2 +- hw/net/opencores_eth.c | 2 +- hw/net/pcnet-pci.c | 2 +- hw/net/rocker/rocker.c | 2 +- hw/net/rtl8139.c | 2 +- hw/net/smc91c111.c | 2 +- hw/net/spapr_llan.c | 2 +- hw/net/stellaris_enet.c | 2 +- hw/net/virtio-net.c | 2 +- hw/net/vmxnet3.c | 2 +- hw/net/xgmac.c | 2 +- hw/net/xilinx_axienet.c | 2 +- hw/net/xilinx_ethlite.c | 2 +- hw/nvram/ds1225y.c | 2 +- hw/nvram/fw_cfg.c | 4 ++-- hw/nvram/mac_nvram.c | 2 +- hw/nvram/spapr_nvram.c | 2 +- hw/pci-bridge/ioh3420.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-bridge/pci_expander_bridge.c | 4 ++-- hw/pci-bridge/xio3130_downstream.c | 2 +- hw/pci-host/piix.c | 2 +- hw/pci-host/ppce500.c | 2 +- hw/pci-host/prep.c | 2 +- hw/pci-host/q35.c | 2 +- hw/pci-host/versatile.c | 2 +- hw/pci/pci.c | 2 +- hw/pci/pcie_port.c | 4 ++-- hw/ppc/spapr_pci.c | 2 +- hw/ppc/spapr_pci_vfio.c | 2 +- hw/ppc/spapr_rng.c | 2 +- hw/ppc/spapr_vio.c | 2 +- hw/s390x/css-bridge.c | 2 +- hw/s390x/ipl.c | 2 +- hw/s390x/s390-pci-bus.c | 2 +- hw/s390x/virtio-ccw.c | 18 +++++++++--------- hw/scsi/megasas.c | 2 +- hw/scsi/mptsas.c | 2 +- hw/scsi/scsi-bus.c | 2 +- hw/scsi/scsi-disk.c | 8 ++++---- hw/scsi/scsi-generic.c | 2 +- hw/scsi/spapr_vscsi.c | 2 +- hw/scsi/vhost-scsi.c | 2 +- hw/scsi/virtio-scsi.c | 2 +- hw/scsi/vmw_pvscsi.c | 2 +- hw/sd/sd.c | 2 +- hw/sd/sdhci.c | 4 ++-- hw/sparc/sun4m.c | 4 ++-- hw/sparc64/sun4u.c | 4 ++-- hw/ssi/aspeed_smc.c | 2 +- hw/ssi/xilinx_spi.c | 2 +- hw/ssi/xilinx_spips.c | 2 +- hw/timer/a9gtimer.c | 2 +- hw/timer/allwinner-a10-pit.c | 2 +- hw/timer/arm_mptimer.c | 2 +- hw/timer/arm_timer.c | 2 +- hw/timer/grlib_gptimer.c | 2 +- hw/timer/hpet.c | 2 +- hw/timer/i8254.c | 2 +- hw/timer/lm32_timer.c | 2 +- hw/timer/m48t59.c | 4 ++-- hw/timer/mc146818rtc.c | 2 +- hw/timer/milkymist-sysctl.c | 2 +- hw/timer/pxa2xx_timer.c | 4 ++-- hw/timer/slavio_timer.c | 2 +- hw/timer/stm32f2xx_timer.c | 2 +- hw/timer/xilinx_timer.c | 2 +- hw/tpm/tpm_tis.c | 2 +- hw/usb/bus.c | 2 +- hw/usb/ccid-card-emulated.c | 2 +- hw/usb/ccid-card-passthru.c | 2 +- hw/usb/dev-audio.c | 2 +- hw/usb/dev-hid.c | 6 +++--- hw/usb/dev-mtp.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/dev-uas.c | 2 +- hw/usb/hcd-ehci-pci.c | 2 +- hw/usb/hcd-ehci-sysbus.c | 2 +- hw/usb/hcd-ohci.c | 4 ++-- hw/usb/hcd-uhci.c | 4 ++-- hw/usb/hcd-xhci.c | 2 +- hw/usb/host-libusb.c | 2 +- hw/usb/redirect.c | 2 +- hw/vfio/pci.c | 2 +- hw/vfio/platform.c | 2 +- hw/virtio/vhost-vsock.c | 2 +- hw/virtio/virtio-balloon.c | 2 +- hw/virtio/virtio-mmio.c | 2 +- hw/virtio/virtio-pci.c | 20 ++++++++++---------- hw/virtio/virtio-rng.c | 2 +- hw/virtio/virtio.c | 2 +- hw/xen/xen_backend.c | 2 +- hw/xen/xen_pt.c | 2 +- include/hw/qdev-core.h | 6 ++++++ target-arm/cpu.c | 2 +- target-i386/cpu.c | 4 ++-- target-microblaze/cpu.c | 2 +- target-ppc/translate_init.c | 6 +++--- tests/test-qdev-global-props.c | 2 +- 261 files changed, 325 insertions(+), 313 deletions(-)