qdev: set properties with device_class_set_props()
The following patch will need to handle properties registration during class_init time. Let's use a device_class_set_props() setter. spatch --macro-file scripts/cocci-macro-file.h --sp-file ./scripts/coccinelle/qdev-set-props.cocci --keep-comments --in-place --dir . @@ typedef DeviceClass; DeviceClass *d; expression val; @@ - d->props = val + device_class_set_props(d, val) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-20-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b77ade9bb3
commit
4f67d30b5e
@ -245,7 +245,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;
|
||||
|
@ -282,7 +282,7 @@ static void acpi_ged_class_init(ObjectClass *class, void *data)
|
||||
AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_CLASS(class);
|
||||
|
||||
dc->desc = "ACPI Generic Event Device";
|
||||
dc->props = acpi_ged_properties;
|
||||
device_class_set_props(dc, acpi_ged_properties);
|
||||
dc->vmsd = &vmstate_acpi_ged;
|
||||
|
||||
hc->plug = acpi_ged_device_plug_cb;
|
||||
|
@ -653,7 +653,7 @@ static void piix4_pm_class_init(ObjectClass *klass, void *data)
|
||||
dc->reset = piix4_pm_reset;
|
||||
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()
|
||||
|
@ -226,7 +226,7 @@ static void vmgenid_device_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
dc->vmsd = &vmstate_vmgenid;
|
||||
dc->realize = vmgenid_realize;
|
||||
dc->props = vmgenid_device_properties;
|
||||
device_class_set_props(dc, vmgenid_device_properties);
|
||||
dc->hotpluggable = false;
|
||||
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
||||
}
|
||||
|
@ -1283,7 +1283,7 @@ static void armsse_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
dc->realize = armsse_realize;
|
||||
dc->vmsd = &armsse_vmstate;
|
||||
dc->props = info->props;
|
||||
device_class_set_props(dc, info->props);
|
||||
dc->reset = armsse_reset;
|
||||
iic->check = armsse_idau_check;
|
||||
asc->info = info;
|
||||
|
@ -288,7 +288,7 @@ static void armv7m_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->realize = armv7m_realize;
|
||||
dc->props = armv7m_properties;
|
||||
device_class_set_props(dc, armv7m_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo armv7m_info = {
|
||||
@ -367,7 +367,7 @@ static void bitband_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->realize = bitband_realize;
|
||||
dc->props = bitband_properties;
|
||||
device_class_set_props(dc, bitband_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo bitband_info = {
|
||||
|
@ -449,7 +449,7 @@ static void aspeed_soc_class_init(ObjectClass *oc, void *data)
|
||||
dc->realize = aspeed_soc_realize;
|
||||
/* Reason: Uses serial_hds and nd_table in realize() directly */
|
||||
dc->user_creatable = false;
|
||||
dc->props = aspeed_soc_properties;
|
||||
device_class_set_props(dc, aspeed_soc_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo aspeed_soc_type_info = {
|
||||
|
@ -180,7 +180,7 @@ static void bcm283x_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
bc->info = data;
|
||||
dc->realize = bcm2836_realize;
|
||||
dc->props = bcm2836_props;
|
||||
device_class_set_props(dc, bcm2836_props);
|
||||
/* Reason: Must be wired up in code (see raspi_init() function) */
|
||||
dc->user_creatable = false;
|
||||
}
|
||||
|
@ -673,7 +673,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;
|
||||
dc->vmsd = &vmstate_integratorcm;
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ static void m2sxxx_soc_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->realize = m2sxxx_soc_realize;
|
||||
dc->props = m2sxxx_soc_properties;
|
||||
device_class_set_props(dc, m2sxxx_soc_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo m2sxxx_soc_info = {
|
||||
|
@ -435,7 +435,7 @@ static void mv88w8618_eth_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->vmsd = &mv88w8618_eth_vmsd;
|
||||
dc->props = mv88w8618_eth_properties;
|
||||
device_class_set_props(dc, mv88w8618_eth_properties);
|
||||
dc->realize = mv88w8618_eth_realize;
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ static void nrf51_soc_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->realize = nrf51_soc_realize;
|
||||
dc->props = nrf51_soc_properties;
|
||||
device_class_set_props(dc, nrf51_soc_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo nrf51_soc_info = {
|
||||
|
@ -1531,7 +1531,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 = {
|
||||
@ -2015,7 +2015,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;
|
||||
}
|
||||
|
||||
|
@ -347,7 +347,7 @@ static void pxa2xx_gpio_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->desc = "PXA2xx GPIO controller";
|
||||
dc->props = pxa2xx_gpio_properties;
|
||||
device_class_set_props(dc, pxa2xx_gpio_properties);
|
||||
dc->vmsd = &vmstate_pxa2xx_gpio_regs;
|
||||
dc->realize = pxa2xx_gpio_realize;
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ static void smmu_base_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
SMMUBaseClass *sbc = ARM_SMMU_CLASS(klass);
|
||||
|
||||
dc->props = smmu_dev_properties;
|
||||
device_class_set_props(dc, smmu_dev_properties);
|
||||
device_class_set_parent_realize(dc, smmu_base_realize,
|
||||
&sbc->parent_realize);
|
||||
dc->reset = smmu_base_reset;
|
||||
|
@ -1083,7 +1083,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);
|
||||
dc->realize = sl_nand_realize;
|
||||
/* Reason: init() method uses drive_get() */
|
||||
dc->user_creatable = false;
|
||||
|
@ -207,7 +207,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 = {
|
||||
|
@ -282,7 +282,7 @@ static void stm32f405_soc_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->realize = stm32f405_soc_realize;
|
||||
dc->props = stm32f405_soc_properties;
|
||||
device_class_set_props(dc, stm32f405_soc_properties);
|
||||
/* No vmstate or reset required: device has no internal state */
|
||||
}
|
||||
|
||||
|
@ -1327,7 +1327,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);
|
||||
dc->realize = strongarm_uart_realize;
|
||||
}
|
||||
|
||||
|
@ -305,7 +305,7 @@ static void versal_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->realize = versal_realize;
|
||||
dc->props = versal_properties;
|
||||
device_class_set_props(dc, versal_properties);
|
||||
/* No VMSD since we haven't got any top-level SoC state to save. */
|
||||
}
|
||||
|
||||
|
@ -657,7 +657,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;
|
||||
/* Reason: Uses serial_hds in realize function, thus can't be used twice */
|
||||
dc->user_creatable = false;
|
||||
|
@ -1420,7 +1420,7 @@ static void ac97_class_init (ObjectClass *klass, void *data)
|
||||
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
|
||||
dc->desc = "Intel 82801AA AC97 Audio";
|
||||
dc->vmsd = &vmstate_ac97;
|
||||
dc->props = ac97_properties;
|
||||
device_class_set_props(dc, ac97_properties);
|
||||
dc->reset = ac97_on_reset;
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ static void adlib_class_initfn (ObjectClass *klass, void *data)
|
||||
dc->realize = adlib_realizefn;
|
||||
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
|
||||
dc->desc = ADLIB_DESC;
|
||||
dc->props = adlib_properties;
|
||||
device_class_set_props(dc, adlib_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo adlib_info = {
|
||||
|
@ -168,7 +168,7 @@ static void cs4231_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
dc->reset = cs_reset;
|
||||
dc->vmsd = &vmstate_cs4231;
|
||||
dc->props = cs4231_properties;
|
||||
device_class_set_props(dc, cs4231_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo cs4231_info = {
|
||||
|
@ -706,7 +706,7 @@ static void cs4231a_class_initfn (ObjectClass *klass, void *data)
|
||||
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
|
||||
dc->desc = "Crystal Semiconductor CS4231A";
|
||||
dc->vmsd = &vmstate_cs4231a;
|
||||
dc->props = cs4231a_properties;
|
||||
device_class_set_props(dc, cs4231a_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo cs4231a_info = {
|
||||
|
@ -908,7 +908,7 @@ static void es1370_class_init (ObjectClass *klass, void *data)
|
||||
dc->desc = "ENSONIQ AudioPCI ES1370";
|
||||
dc->vmsd = &vmstate_es1370;
|
||||
dc->reset = es1370_on_reset;
|
||||
dc->props = es1370_properties;
|
||||
device_class_set_props(dc, es1370_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo es1370_info = {
|
||||
|
@ -315,7 +315,7 @@ static void gus_class_initfn (ObjectClass *klass, void *data)
|
||||
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
|
||||
dc->desc = "Gravis Ultrasound GF1";
|
||||
dc->vmsd = &vmstate_gus;
|
||||
dc->props = gus_properties;
|
||||
device_class_set_props(dc, gus_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo gus_info = {
|
||||
|
@ -892,7 +892,7 @@ static void hda_audio_base_class_init(ObjectClass *klass, void *data)
|
||||
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
|
||||
dc->reset = hda_audio_reset;
|
||||
dc->vmsd = &vmstate_hda_audio;
|
||||
dc->props = hda_audio_properties;
|
||||
device_class_set_props(dc, hda_audio_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo hda_audio_info = {
|
||||
|
@ -1233,7 +1233,7 @@ static void intel_hda_class_init(ObjectClass *klass, void *data)
|
||||
k->class_id = PCI_CLASS_MULTIMEDIA_HD_AUDIO;
|
||||
dc->reset = intel_hda_reset;
|
||||
dc->vmsd = &vmstate_intel_hda;
|
||||
dc->props = intel_hda_properties;
|
||||
device_class_set_props(dc, intel_hda_properties);
|
||||
}
|
||||
|
||||
static void intel_hda_class_init_ich6(ObjectClass *klass, void *data)
|
||||
@ -1289,7 +1289,7 @@ static void hda_codec_device_class_init(ObjectClass *klass, void *data)
|
||||
k->unrealize = hda_codec_dev_unrealize;
|
||||
set_bit(DEVICE_CATEGORY_SOUND, k->categories);
|
||||
k->bus_type = TYPE_HDA_BUS;
|
||||
k->props = hda_props;
|
||||
device_class_set_props(k, hda_props);
|
||||
}
|
||||
|
||||
static const TypeInfo hda_codec_device_type_info = {
|
||||
|
@ -342,7 +342,7 @@ static void milkymist_ac97_class_init(ObjectClass *klass, void *data)
|
||||
dc->realize = milkymist_ac97_realize;
|
||||
dc->reset = milkymist_ac97_reset;
|
||||
dc->vmsd = &vmstate_milkymist_ac97;
|
||||
dc->props = milkymist_ac97_properties;
|
||||
device_class_set_props(dc, milkymist_ac97_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo milkymist_ac97_info = {
|
||||
|
@ -222,7 +222,7 @@ static void pcspk_class_initfn(ObjectClass *klass, void *data)
|
||||
dc->realize = pcspk_realizefn;
|
||||
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
|
||||
dc->vmsd = &vmstate_spk;
|
||||
dc->props = pcspk_properties;
|
||||
device_class_set_props(dc, pcspk_properties);
|
||||
/* Reason: realize sets global pcspk_state */
|
||||
/* Reason: pit object link */
|
||||
dc->user_creatable = false;
|
||||
|
@ -640,7 +640,7 @@ static void pl041_device_class_init(ObjectClass *klass, void *data)
|
||||
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
|
||||
dc->reset = pl041_device_reset;
|
||||
dc->vmsd = &vmstate_pl041;
|
||||
dc->props = pl041_device_properties;
|
||||
device_class_set_props(dc, pl041_device_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo pl041_device_info = {
|
||||
|
@ -1439,7 +1439,7 @@ static void sb16_class_initfn (ObjectClass *klass, void *data)
|
||||
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
|
||||
dc->desc = "Creative Sound Blaster 16";
|
||||
dc->vmsd = &vmstate_sb16;
|
||||
dc->props = sb16_properties;
|
||||
device_class_set_props(dc, sb16_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo sb16_info = {
|
||||
|
@ -717,7 +717,7 @@ static void wm8750_class_init(ObjectClass *klass, void *data)
|
||||
sc->recv = wm8750_rx;
|
||||
sc->send = wm8750_tx;
|
||||
dc->vmsd = &vmstate_wm8750;
|
||||
dc->props = wm8750_properties;
|
||||
device_class_set_props(dc, wm8750_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo wm8750_info = {
|
||||
|
@ -606,7 +606,7 @@ static void floppy_drive_class_init(ObjectClass *klass, void *data)
|
||||
k->realize = floppy_drive_realize;
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, k->categories);
|
||||
k->bus_type = TYPE_FLOPPY_BUS;
|
||||
k->props = floppy_drive_properties;
|
||||
device_class_set_props(k, floppy_drive_properties);
|
||||
k->desc = "virtual floppy drive";
|
||||
}
|
||||
|
||||
@ -2827,7 +2827,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);
|
||||
}
|
||||
|
||||
@ -2880,7 +2880,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);
|
||||
}
|
||||
|
||||
@ -2906,7 +2906,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);
|
||||
}
|
||||
|
||||
|
@ -1391,7 +1391,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;
|
||||
}
|
||||
|
@ -448,7 +448,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 = {
|
||||
|
@ -1475,7 +1475,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;
|
||||
}
|
||||
|
||||
|
@ -845,7 +845,7 @@ static void onenand_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
dc->realize = onenand_realize;
|
||||
dc->reset = onenand_system_reset;
|
||||
dc->props = onenand_properties;
|
||||
device_class_set_props(dc, onenand_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo onenand_info = {
|
||||
|
@ -930,7 +930,7 @@ static void pflash_cfi01_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
dc->reset = pflash_cfi01_system_reset;
|
||||
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);
|
||||
}
|
||||
|
@ -963,7 +963,7 @@ static void pflash_cfi02_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
dc->realize = pflash_cfi02_realize;
|
||||
dc->unrealize = pflash_cfi02_unrealize;
|
||||
dc->props = pflash_cfi02_properties;
|
||||
device_class_set_props(dc, pflash_cfi02_properties);
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ static void swim_drive_class_init(ObjectClass *klass, void *data)
|
||||
k->realize = swim_drive_realize;
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, k->categories);
|
||||
k->bus_type = TYPE_SWIM_BUS;
|
||||
k->props = swim_drive_properties;
|
||||
device_class_set_props(k, swim_drive_properties);
|
||||
k->desc = "virtual SWIM drive";
|
||||
}
|
||||
|
||||
|
@ -511,7 +511,7 @@ static void vhost_user_blk_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
|
||||
|
||||
dc->props = vhost_user_blk_properties;
|
||||
device_class_set_props(dc, vhost_user_blk_properties);
|
||||
dc->vmsd = &vmstate_vhost_user_blk;
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
||||
vdc->realize = vhost_user_blk_device_realize;
|
||||
|
@ -1294,7 +1294,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;
|
||||
|
@ -554,7 +554,7 @@ static void xen_block_class_init(ObjectClass *class, void *data)
|
||||
xendev_class->frontend_changed = xen_block_frontend_changed;
|
||||
xendev_class->unrealize = xen_block_unrealize;
|
||||
|
||||
dev_class->props = xen_block_props;
|
||||
device_class_set_props(dev_class, xen_block_props);
|
||||
}
|
||||
|
||||
static const TypeInfo xen_block_type_info = {
|
||||
|
@ -299,7 +299,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 = {
|
||||
|
@ -550,7 +550,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 = {
|
||||
|
@ -389,7 +389,7 @@ static void cmsdk_apb_uart_class_init(ObjectClass *klass, void *data)
|
||||
dc->realize = cmsdk_apb_uart_realize;
|
||||
dc->vmsd = &cmsdk_apb_uart_vmstate;
|
||||
dc->reset = cmsdk_apb_uart_reset;
|
||||
dc->props = cmsdk_apb_uart_properties;
|
||||
device_class_set_props(dc, cmsdk_apb_uart_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo cmsdk_apb_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);
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,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 = {
|
||||
|
@ -865,7 +865,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);
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,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;
|
||||
}
|
||||
|
||||
|
@ -645,7 +645,7 @@ static void exynos4210_uart_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
dc->realize = exynos4210_uart_realize;
|
||||
dc->reset = exynos4210_uart_reset;
|
||||
dc->props = exynos4210_uart_properties;
|
||||
device_class_set_props(dc, exynos4210_uart_properties);
|
||||
dc->vmsd = &vmstate_exynos4210_uart;
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ static void grlib_apbuart_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
dc->realize = grlib_apbuart_realize;
|
||||
dc->reset = grlib_apbuart_reset;
|
||||
dc->props = grlib_apbuart_properties;
|
||||
device_class_set_props(dc, grlib_apbuart_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo grlib_apbuart_info = {
|
||||
|
@ -372,7 +372,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 = {
|
||||
|
@ -588,7 +588,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;
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,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;
|
||||
}
|
||||
|
||||
|
@ -320,7 +320,7 @@ static void mcf_uart_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
dc->realize = mcf_uart_realize;
|
||||
dc->reset = mcf_uart_reset;
|
||||
dc->props = mcf_uart_properties;
|
||||
device_class_set_props(dc, mcf_uart_properties);
|
||||
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
|
||||
}
|
||||
|
||||
|
@ -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 = {
|
||||
|
@ -314,7 +314,7 @@ static void nrf51_uart_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
dc->reset = nrf51_uart_reset;
|
||||
dc->realize = nrf51_uart_realize;
|
||||
dc->props = nrf51_uart_properties;
|
||||
device_class_set_props(dc, nrf51_uart_properties);
|
||||
dc->vmsd = &nrf51_uart_vmstate;
|
||||
}
|
||||
|
||||
|
@ -627,7 +627,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);
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,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 = {
|
||||
|
@ -342,7 +342,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;
|
||||
|
@ -258,7 +258,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;
|
||||
|
@ -106,7 +106,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);
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,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);
|
||||
}
|
||||
|
||||
@ -176,7 +176,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);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,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);
|
||||
}
|
||||
|
||||
|
@ -1044,7 +1044,7 @@ static void serial_class_init(ObjectClass *klass, void* data)
|
||||
dc->realize = serial_realize;
|
||||
dc->unrealize = serial_unrealize;
|
||||
dc->vmsd = &vmstate_serial;
|
||||
dc->props = serial_properties;
|
||||
device_class_set_props(dc, serial_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo serial_info = {
|
||||
@ -1159,7 +1159,7 @@ static void serial_mm_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(oc);
|
||||
|
||||
dc->props = serial_mm_properties;
|
||||
device_class_set_props(dc, serial_mm_properties);
|
||||
dc->realize = serial_mm_realize;
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,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;
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,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;
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ static void terminal_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
EmulatedCcw3270Class *ck = EMULATED_CCW_3270_CLASS(klass);
|
||||
|
||||
dc->props = terminal_properties;
|
||||
device_class_set_props(dc, terminal_properties);
|
||||
dc->vmsd = &terminal3270_vmstate;
|
||||
ck->init = terminal_init;
|
||||
ck->read_payload_3270 = read_payload_3270;
|
||||
|
@ -287,7 +287,7 @@ static void virtserialport_class_init(ObjectClass *klass, void *data)
|
||||
k->set_guest_connected = set_guest_connected;
|
||||
k->enable_backend = virtconsole_enable_backend;
|
||||
k->guest_writable = guest_writable;
|
||||
dc->props = virtserialport_properties;
|
||||
device_class_set_props(dc, virtserialport_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo virtserialport_info = {
|
||||
|
@ -1110,7 +1110,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 = {
|
||||
@ -1179,7 +1179,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;
|
||||
|
@ -236,7 +236,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 = {
|
||||
|
@ -440,7 +440,7 @@ static void cpu_class_init(ObjectClass *klass, void *data)
|
||||
set_bit(DEVICE_CATEGORY_CPU, dc->categories);
|
||||
dc->realize = cpu_common_realizefn;
|
||||
dc->unrealize = cpu_common_unrealizefn;
|
||||
dc->props = cpu_common_props;
|
||||
device_class_set_props(dc, cpu_common_props);
|
||||
/*
|
||||
* Reason: CPUs still need special care by board code: wiring up
|
||||
* IRQs, adding reset handlers, halting non-first CPUs, ...
|
||||
|
@ -201,7 +201,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";
|
||||
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
||||
}
|
||||
|
@ -125,7 +125,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;
|
||||
|
||||
|
@ -211,7 +211,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 = {
|
||||
|
@ -1061,6 +1061,11 @@ static void device_class_init(ObjectClass *class, void *data)
|
||||
vc->get_id = device_vmstate_if_get_id;
|
||||
}
|
||||
|
||||
void device_class_set_props(DeviceClass *dc, Property *props)
|
||||
{
|
||||
dc->props = props;
|
||||
}
|
||||
|
||||
void device_class_set_parent_reset(DeviceClass *dc,
|
||||
DeviceReset dev_reset,
|
||||
DeviceReset *parent_reset)
|
||||
|
@ -69,7 +69,7 @@ static void split_irq_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
/* No state to reset or migrate */
|
||||
dc->props = split_irq_properties;
|
||||
device_class_set_props(dc, split_irq_properties);
|
||||
dc->realize = split_irq_realize;
|
||||
|
||||
/* Reason: Needs to be wired up to work */
|
||||
|
@ -164,7 +164,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 */
|
||||
}
|
||||
|
||||
|
@ -175,7 +175,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 = {
|
||||
|
@ -156,7 +156,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 = {
|
||||
|
@ -78,7 +78,7 @@ static void cpu_cluster_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->props = cpu_cluster_properties;
|
||||
device_class_set_props(dc, cpu_cluster_properties);
|
||||
dc->realize = cpu_cluster_realize;
|
||||
|
||||
/* This is not directly for users, CPU children must be attached by code */
|
||||
|
@ -125,7 +125,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 = {
|
||||
|
@ -980,7 +980,7 @@ static void ati_vga_class_init(ObjectClass *klass, void *data)
|
||||
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
|
||||
|
||||
dc->reset = ati_vga_reset;
|
||||
dc->props = ati_vga_properties;
|
||||
device_class_set_props(dc, ati_vga_properties);
|
||||
dc->hotpluggable = false;
|
||||
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
|
||||
|
||||
|
@ -451,7 +451,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;
|
||||
|
@ -364,7 +364,7 @@ static void bochs_display_class_init(ObjectClass *klass, void *data)
|
||||
k->romfile = "vgabios-bochs-display.bin";
|
||||
k->exit = bochs_display_exit;
|
||||
dc->vmsd = &vmstate_bochs_display;
|
||||
dc->props = bochs_display_properties;
|
||||
device_class_set_props(dc, bochs_display_properties);
|
||||
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
|
||||
}
|
||||
|
||||
|
@ -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 = {
|
||||
|
@ -3031,7 +3031,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;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,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);
|
||||
}
|
||||
|
||||
|
@ -526,7 +526,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 = {
|
||||
|
@ -107,7 +107,7 @@ static void i2c_ddc_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
dc->reset = i2c_ddc_reset;
|
||||
dc->vmsd = &vmstate_i2c_ddc;
|
||||
dc->props = i2c_ddc_properties;
|
||||
device_class_set_props(dc, i2c_ddc_properties);
|
||||
isc->event = i2c_ddc_event;
|
||||
isc->recv = i2c_ddc_rx;
|
||||
isc->send = i2c_ddc_tx;
|
||||
|
@ -437,7 +437,7 @@ static void macfb_sysbus_class_init(ObjectClass *klass, void *data)
|
||||
dc->desc = "SysBus Macintosh framebuffer";
|
||||
dc->reset = macfb_sysbus_reset;
|
||||
dc->vmsd = &vmstate_macfb;
|
||||
dc->props = macfb_sysbus_properties;
|
||||
device_class_set_props(dc, macfb_sysbus_properties);
|
||||
}
|
||||
|
||||
static void macfb_nubus_class_init(ObjectClass *klass, void *data)
|
||||
@ -450,7 +450,7 @@ static void macfb_nubus_class_init(ObjectClass *klass, void *data)
|
||||
dc->desc = "Nubus Macintosh framebuffer";
|
||||
dc->reset = macfb_nubus_reset;
|
||||
dc->vmsd = &vmstate_macfb;
|
||||
dc->props = macfb_nubus_properties;
|
||||
device_class_set_props(dc, macfb_nubus_properties);
|
||||
}
|
||||
|
||||
static TypeInfo macfb_sysbus_info = {
|
||||
|
@ -341,7 +341,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;
|
||||
}
|
||||
|
||||
|
@ -2478,7 +2478,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 = {
|
||||
|
@ -52,7 +52,7 @@ static void ramfb_class_initfn(ObjectClass *klass, void *data)
|
||||
|
||||
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
|
||||
dc->realize = ramfb_realizefn;
|
||||
dc->props = ramfb_properties;
|
||||
device_class_set_props(dc, ramfb_properties);
|
||||
dc->desc = "ram framebuffer standalone device";
|
||||
dc->user_creatable = true;
|
||||
}
|
||||
|
@ -1995,7 +1995,7 @@ static void sm501_sysbus_class_init(ObjectClass *klass, void *data)
|
||||
dc->realize = sm501_realize_sysbus;
|
||||
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
|
||||
dc->desc = "SM501 Multimedia Companion";
|
||||
dc->props = sm501_sysbus_properties;
|
||||
device_class_set_props(dc, sm501_sysbus_properties);
|
||||
dc->reset = sm501_reset_sysbus;
|
||||
dc->vmsd = &vmstate_sm501_sysbus;
|
||||
}
|
||||
@ -2085,7 +2085,7 @@ static void sm501_pci_class_init(ObjectClass *klass, void *data)
|
||||
k->class_id = PCI_CLASS_DISPLAY_OTHER;
|
||||
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
|
||||
dc->desc = "SM501 Display Controller";
|
||||
dc->props = sm501_pci_properties;
|
||||
device_class_set_props(dc, sm501_pci_properties);
|
||||
dc->reset = sm501_reset_pci;
|
||||
dc->hotpluggable = false;
|
||||
dc->vmsd = &vmstate_sm501_pci;
|
||||
|
@ -893,7 +893,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 = {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user