[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/9] hw/usb/dev-smartcard-reader: Avoid forward-declaring CCIDBus
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 1/9] hw/usb/dev-smartcard-reader: Avoid forward-declaring CCIDBus |
Date: |
Mon, 20 Feb 2023 16:05:07 +0100 |
To avoid forward-declaring CCIDBus, declare CCID_BUS QOM
definitions before its use in the USBCCIDState structure.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/usb/dev-smartcard-reader.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 28164d89be..be0a4fc3bc 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -278,7 +278,9 @@ typedef struct BulkIn {
struct CCIDBus {
BusState qbus;
};
-typedef struct CCIDBus CCIDBus;
+
+#define TYPE_CCID_BUS "ccid-bus"
+OBJECT_DECLARE_SIMPLE_TYPE(CCIDBus, CCID_BUS)
/*
* powered - defaults to true, changed by PowerOn/PowerOff messages
@@ -1174,9 +1176,6 @@ static Property ccid_props[] = {
DEFINE_PROP_END_OF_LIST(),
};
-#define TYPE_CCID_BUS "ccid-bus"
-OBJECT_DECLARE_SIMPLE_TYPE(CCIDBus, CCID_BUS)
-
static const TypeInfo ccid_bus_info = {
.name = TYPE_CCID_BUS,
.parent = TYPE_BUS,
--
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é <=
- [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