[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/19] hw/usb: Set QDev properties using QDev API
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 08/19] hw/usb: Set QDev properties using QDev API |
Date: |
Fri, 3 Feb 2023 19:09:03 +0100 |
No need to use the low-level QOM API when an object
inherits from QDev. Directly use the QDev API to set
its properties.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/usb/hcd-xhci-pci.c | 2 +-
hw/usb/hcd-xhci-sysbus.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
index 643d4643e4..7511af4ce2 100644
--- a/hw/usb/hcd-xhci-pci.c
+++ b/hw/usb/hcd-xhci-pci.c
@@ -115,7 +115,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev,
Error **errp)
dev->config[PCI_CACHE_LINE_SIZE] = 0x10;
dev->config[0x60] = 0x30; /* release number */
- object_property_set_link(OBJECT(&s->xhci), "host", OBJECT(s), NULL);
+ qdev_prop_set_link(DEVICE(&s->xhci), "host", OBJECT(s));
s->xhci.intr_update = xhci_pci_intr_update;
s->xhci.intr_raise = xhci_pci_intr_raise;
if (!qdev_realize(DEVICE(&s->xhci), NULL, errp)) {
diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c
index faf57b4797..d73c71015b 100644
--- a/hw/usb/hcd-xhci-sysbus.c
+++ b/hw/usb/hcd-xhci-sysbus.c
@@ -36,7 +36,7 @@ static void xhci_sysbus_realize(DeviceState *dev, Error
**errp)
{
XHCISysbusState *s = XHCI_SYSBUS(dev);
- object_property_set_link(OBJECT(&s->xhci), "host", OBJECT(s), NULL);
+ qdev_prop_set_link(DEVICE(&s->xhci), "host", OBJECT(s));
if (!qdev_realize(DEVICE(&s->xhci), NULL, errp)) {
return;
}
--
2.38.1
- [PATCH 00/19] hw: Set QDev properties using QDev API (part 1/3), Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 01/19] NOTFORMERGE scripts/coccinelle: Add qom-qdev-prop.cocci, Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 02/19] hw/qdev: Introduce qdev_prop_set_link(), Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 03/19] hw/acpi: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 04/19] hw/audio: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [RFC PATCH 05/19] hw/core/numa: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 06/19] hw/core/gpio: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [RFC PATCH 07/19] hw/scsi: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 08/19] hw/usb: Set QDev properties using QDev API,
Philippe Mathieu-Daudé <=
- [PATCH 09/19] hw/virtio: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 10/19] hw/avr: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 11/19] hw/hppa: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [RFC PATCH 12/19] hw/i386: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 13/19] hw/m68k: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 14/19] hw/microblaze: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [RFC PATCH 15/19] hw/mips: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03
- [PATCH 16/19] hw/nios2: Set QDev properties using QDev API, Philippe Mathieu-Daudé, 2023/02/03