diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-01-10 19:30:32 +0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-01-24 20:59:15 +0100 |
commit | 4f67d30b5e74e060b8dbe10528829b47345cd6e8 (patch) | |
tree | 025b44a1cb86fe029ed4c105b2764a13c21c5bba /hw/arm | |
parent | b77ade9bb37b2e9813a42008cb21d0c743aa50a1 (diff) | |
download | qemu-4f67d30b5e74e060b8dbe10528829b47345cd6e8.zip qemu-4f67d30b5e74e060b8dbe10528829b47345cd6e8.tar.gz qemu-4f67d30b5e74e060b8dbe10528829b47345cd6e8.tar.bz2 |
qdev: set properties with device_class_set_props()
The following patch will need to handle properties registration during
class_init time. Let's use a device_class_set_props() setter.
spatch --macro-file scripts/cocci-macro-file.h --sp-file
./scripts/coccinelle/qdev-set-props.cocci --keep-comments --in-place
--dir .
@@
typedef DeviceClass;
DeviceClass *d;
expression val;
@@
- d->props = val
+ device_class_set_props(d, val)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200110153039.1379601-20-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/arm')
-rw-r--r-- | hw/arm/armsse.c | 2 | ||||
-rw-r--r-- | hw/arm/armv7m.c | 4 | ||||
-rw-r--r-- | hw/arm/aspeed_soc.c | 2 | ||||
-rw-r--r-- | hw/arm/bcm2836.c | 2 | ||||
-rw-r--r-- | hw/arm/integratorcp.c | 2 | ||||
-rw-r--r-- | hw/arm/msf2-soc.c | 2 | ||||
-rw-r--r-- | hw/arm/musicpal.c | 2 | ||||
-rw-r--r-- | hw/arm/nrf51_soc.c | 2 | ||||
-rw-r--r-- | hw/arm/pxa2xx.c | 4 | ||||
-rw-r--r-- | hw/arm/pxa2xx_gpio.c | 2 | ||||
-rw-r--r-- | hw/arm/smmu-common.c | 2 | ||||
-rw-r--r-- | hw/arm/spitz.c | 2 | ||||
-rw-r--r-- | hw/arm/stm32f205_soc.c | 2 | ||||
-rw-r--r-- | hw/arm/stm32f405_soc.c | 2 | ||||
-rw-r--r-- | hw/arm/strongarm.c | 2 | ||||
-rw-r--r-- | hw/arm/xlnx-versal.c | 2 | ||||
-rw-r--r-- | hw/arm/xlnx-zynqmp.c | 2 |
17 files changed, 19 insertions, 19 deletions
diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index e5263aa..174ca7e 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -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; diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 7a3c48f..5d4a581 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -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 = { diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c index a6237e5..99892cb 100644 --- a/hw/arm/aspeed_soc.c +++ b/hw/arm/aspeed_soc.c @@ -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 = { diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 221ff06..38e2941 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -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; } diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index 5249708..0cd94d9 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -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; } diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c index 008fd932..8f84692 100644 --- a/hw/arm/msf2-soc.c +++ b/hw/arm/msf2-soc.c @@ -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 = { diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index f68a399..dc551bb 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -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; } diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c index 7402916..4817a76 100644 --- a/hw/arm/nrf51_soc.c +++ b/hw/arm/nrf51_soc.c @@ -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 = { diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 950ff42..b33f8f1 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -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; } diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_gpio.c index 86a0e86..f8df3cc 100644 --- a/hw/arm/pxa2xx_gpio.c +++ b/hw/arm/pxa2xx_gpio.c @@ -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; } diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 245817d..23eb117 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c @@ -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; diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index 25bd0f5..e001088 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -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; diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c index f5a5c2d..627fd44 100644 --- a/hw/arm/stm32f205_soc.c +++ b/hw/arm/stm32f205_soc.c @@ -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 = { diff --git a/hw/arm/stm32f405_soc.c b/hw/arm/stm32f405_soc.c index f22516f..9bcad97 100644 --- a/hw/arm/stm32f405_soc.c +++ b/hw/arm/stm32f405_soc.c @@ -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 */ } diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index c6776e8..cd8a99a 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -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; } diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c index 8b3d8d8..1cf3daa 100644 --- a/hw/arm/xlnx-versal.c +++ b/hw/arm/xlnx-versal.c @@ -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. */ } diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index fb03c60..cab0160 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -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; |