[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/7] hw/net: Declare link using static DEFINE_PROP_LINK() macro
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 6/7] hw/net: Declare link using static DEFINE_PROP_LINK() macro |
Date: |
Tue, 17 Oct 2023 16:01:49 +0200 |
Declare link statically using DEFINE_PROP_LINK().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/net/cadence_gem.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
index f445d8bb5e..37e209cda6 100644
--- a/hw/net/cadence_gem.c
+++ b/hw/net/cadence_gem.c
@@ -1654,11 +1654,6 @@ static void gem_init(Object *obj)
"enet", sizeof(s->regs));
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
-
- object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
- (Object **)&s->dma_mr,
- qdev_prop_allow_set_link_before_realize,
- OBJ_PROP_LINK_STRONG);
}
static const VMStateDescription vmstate_cadence_gem = {
@@ -1691,6 +1686,8 @@ static Property gem_properties[] = {
num_type2_screeners, 4),
DEFINE_PROP_UINT16("jumbo-max-len", CadenceGEMState,
jumbo_max_len, 10240),
+ DEFINE_PROP_LINK("dma", CadenceGEMState, dma_mr,
+ TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
};
--
2.41.0
- [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro, (continued)
- [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro, Philippe Mathieu-Daudé, 2023/10/17
- [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro, Philippe Mathieu-Daudé, 2023/10/17
- [PATCH 7/7] hw/usb: Declare link using static DEFINE_PROP_LINK() macro, Philippe Mathieu-Daudé, 2023/10/17
- [PATCH 5/7] hw/dma: Declare link using static DEFINE_PROP_LINK() macro, Philippe Mathieu-Daudé, 2023/10/17
- [PATCH 6/7] hw/net: Declare link using static DEFINE_PROP_LINK() macro,
Philippe Mathieu-Daudé <=
- Re: [PATCH 0/7] hw: Few more QOM/QDev cleanups, Michael S. Tsirkin, 2023/10/17
- Re: [PATCH 0/7] hw: Few more QOM/QDev cleanups, Philippe Mathieu-Daudé, 2023/10/19