aboutsummaryrefslogtreecommitdiff
path: root/hw/ssi
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2020-01-10 19:30:32 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-01-24 20:59:15 +0100
commit4f67d30b5e74e060b8dbe10528829b47345cd6e8 (patch)
tree025b44a1cb86fe029ed4c105b2764a13c21c5bba /hw/ssi
parentb77ade9bb37b2e9813a42008cb21d0c743aa50a1 (diff)
downloadqemu-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/ssi')
-rw-r--r--hw/ssi/aspeed_smc.c2
-rw-r--r--hw/ssi/xilinx_spi.c2
-rw-r--r--hw/ssi/xilinx_spips.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
index 7755eca..23c8d2f 100644
--- a/hw/ssi/aspeed_smc.c
+++ b/hw/ssi/aspeed_smc.c
@@ -1401,7 +1401,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;
}
diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c
index a1be0de..eba7ccd 100644
--- a/hw/ssi/xilinx_spi.c
+++ b/hw/ssi/xilinx_spi.c
@@ -372,7 +372,7 @@ static void xilinx_spi_class_init(ObjectClass *klass, void *data)
dc->realize = xilinx_spi_realize;
dc->reset = xlx_spi_reset;
- dc->props = xilinx_spi_properties;
+ device_class_set_props(dc, xilinx_spi_properties);
dc->vmsd = &vmstate_xilinx_spi;
}
diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c
index 0d6c2e1..6c9ef59 100644
--- a/hw/ssi/xilinx_spips.c
+++ b/hw/ssi/xilinx_spips.c
@@ -1455,7 +1455,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;
@@ -1471,7 +1471,7 @@ static void xlnx_zynqmp_qspips_class_init(ObjectClass *klass, void * data)
dc->realize = xlnx_zynqmp_qspips_realize;
dc->reset = xlnx_zynqmp_qspips_reset;
dc->vmsd = &vmstate_xlnx_zynqmp_qspips;
- dc->props = xilinx_zynqmp_qspips_properties;
+ device_class_set_props(dc, xilinx_zynqmp_qspips_properties);
xsc->reg_ops = &xlnx_zynqmp_qspips_ops;
xsc->rx_fifo_size = RXFF_A_Q;
xsc->tx_fifo_size = TXFF_A_Q;