[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/9] hw/usb/hcd-uhci: Declare QOM macros using OBJECT_DECLARE_TYP
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 4/9] hw/usb/hcd-uhci: Declare QOM macros using OBJECT_DECLARE_TYPE() |
Date: |
Mon, 20 Feb 2023 16:05:10 +0100 |
The automatic conversion done during commit a489d1951c
("Use OBJECT_DECLARE_TYPE when possible") missed this
model because the typedefs are in a different file unit
(hcd-uhci.c) than where the DECLARE_INSTANCE_CHECKER()
is (hcd-uhci.h). Manually convert to OBJECT_DECLARE_TYPE().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/usb/hcd-uhci.c | 2 --
hw/usb/hcd-uhci.h | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 30ae0104bb..f77ffda69a 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -60,9 +60,7 @@ enum {
TD_RESULT_ASYNC_CONT,
};
-typedef struct UHCIState UHCIState;
typedef struct UHCIAsync UHCIAsync;
-typedef struct UHCIPCIDeviceClass UHCIPCIDeviceClass;
struct UHCIPCIDeviceClass {
PCIDeviceClass parent_class;
diff --git a/hw/usb/hcd-uhci.h b/hw/usb/hcd-uhci.h
index e0fdb98ef1..69f8b40c49 100644
--- a/hw/usb/hcd-uhci.h
+++ b/hw/usb/hcd-uhci.h
@@ -75,7 +75,7 @@ typedef struct UHCIState {
} UHCIState;
#define TYPE_UHCI "pci-uhci-usb"
-DECLARE_INSTANCE_CHECKER(UHCIState, UHCI, TYPE_UHCI)
+OBJECT_DECLARE_TYPE(UHCIState, UHCIPCIDeviceClass, UHCI)
typedef struct UHCIInfo {
const char *name;
--
2.38.1
- [PATCH 0/9] hw/usb: Cleanups around QOM style, Philippe Mathieu-Daudé, 2023/02/20
- [PATCH 1/9] hw/usb/dev-smartcard-reader: Avoid forward-declaring CCIDBus, Philippe Mathieu-Daudé, 2023/02/20
- [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é <=
- [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é, 2023/02/20
- [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