[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/9] hw/usb/hcd-xhci-nec: Replace container_of() by NEC_XHCI() QO
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 7/9] hw/usb/hcd-xhci-nec: Replace container_of() by NEC_XHCI() QOM cast macro |
Date: |
Mon, 20 Feb 2023 16:05:13 +0100 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/usb/hcd-xhci-nec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c
index d732be0ef9..328e5bfe7c 100644
--- a/hw/usb/hcd-xhci-nec.c
+++ b/hw/usb/hcd-xhci-nec.c
@@ -53,7 +53,7 @@ static Property nec_xhci_properties[] = {
static void nec_xhci_instance_init(Object *obj)
{
XHCIPciState *pci = XHCI_PCI(obj);
- XHCINecState *nec = container_of(pci, XHCINecState, parent_obj);
+ XHCINecState *nec = NEC_XHCI(obj);
pci->xhci.flags = nec->flags;
pci->xhci.numintrs = nec->intrs;
--
2.38.1
- Re: [PATCH 1/9] hw/usb/dev-smartcard-reader: Avoid forward-declaring CCIDBus, (continued)
- [PATCH 2/9] hw/usb/hcd-ohci: Use OHCIState type definition, Philippe Mathieu-Daudé, 2023/02/20
- [PATCH 3/9] hw/usb/hcd-ohci-pci: Use QOM type-safe cast conversion macro, Philippe Mathieu-Daudé, 2023/02/20
- [PATCH 4/9] hw/usb/hcd-uhci: Declare QOM macros using OBJECT_DECLARE_TYPE(), Philippe Mathieu-Daudé, 2023/02/20
- [PATCH 5/9] hw/usb/hcd-uhci: Replace container_of() by UHCI_GET_CLASS() QOM macro, Philippe Mathieu-Daudé, 2023/02/20
- [PATCH 6/9] hw/usb/hcd-xhci-nec: Declare QOM macros for NEC_XHCI, Philippe Mathieu-Daudé, 2023/02/20
- [PATCH 7/9] hw/usb/hcd-xhci-nec: Replace container_of() by NEC_XHCI() QOM cast macro,
Philippe Mathieu-Daudé <=
- [PATCH 8/9] hw/usb/u2f: Declare QOM macros using OBJECT_DECLARE_TYPE(), Philippe Mathieu-Daudé, 2023/02/20
- [PATCH 9/9] hw/usb/u2f-passthru: Use QOM type-safe cast conversion macros, Philippe Mathieu-Daudé, 2023/02/20