]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
hw/usb/uhci: Declare QOM macros using OBJECT_DECLARE_TYPE()
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 6 Jan 2023 12:58:32 +0000 (13:58 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 27 Feb 2023 21:29:02 +0000 (22:29 +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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230220150515.32549-5-philmd@linaro.org>

hw/usb/hcd-uhci.c
hw/usb/hcd-uhci.h

index 30ae0104bb9dc987110a52927ccf534db3affc48..f77ffda69a5cf201dba4206a7f52cc79fe5dbaf6 100644 (file)
@@ -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;
index e0fdb98ef15c87295c564e2f0a09d196be56b502..69f8b40c49c2febf063a0f3ee3e5fd677e3f7a9a 100644 (file)
@@ -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;