Skip to content

Commit

Permalink
hw/usb/dev-smartcard-reader: Avoid forward-declaring CCIDBus
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230220150515.32549-2-philmd@linaro.org>
  • Loading branch information
philmd committed Feb 27, 2023
1 parent c272a72 commit 1fc3efc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions hw/usb/dev-smartcard-reader.c
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1fc3efc

Please sign in to comment.