diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-16 14:25:18 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-18 14:12:32 -0400 |
commit | a489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (patch) | |
tree | 1b0c2f48420f830de630eae114d39dc88c3496f4 /hw/usb | |
parent | 30b5707c269cac1ad80b72f777e52c8e08b2ff19 (diff) |
Use OBJECT_DECLARE_TYPE when possible
This converts existing DECLARE_OBJ_CHECKERS usage to
OBJECT_DECLARE_TYPE when possible.
$ ./scripts/codeconverter/converter.py -i \
--pattern=AddObjectDeclareType $(git grep -l '' -- '*.[ch]')
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Acked-by: Paul Durrant <paul@xen.org>
Message-Id: <20200916182519.415636-5-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/ccid.h | 5 | ||||
-rw-r--r-- | hw/usb/hcd-dwc2.h | 3 | ||||
-rw-r--r-- | hw/usb/hcd-ehci.h | 5 |
3 files changed, 3 insertions, 10 deletions
diff --git a/hw/usb/ccid.h b/hw/usb/ccid.h index ef2bb3462d..6b82a55bd4 100644 --- a/hw/usb/ccid.h +++ b/hw/usb/ccid.h @@ -13,13 +13,10 @@ #include "hw/qdev-core.h" #include "qom/object.h" -typedef struct CCIDCardState CCIDCardState; typedef struct CCIDCardInfo CCIDCardInfo; #define TYPE_CCID_CARD "ccid-card" -typedef struct CCIDCardClass CCIDCardClass; -DECLARE_OBJ_CHECKERS(CCIDCardState, CCIDCardClass, - CCID_CARD, TYPE_CCID_CARD) +OBJECT_DECLARE_TYPE(CCIDCardState, CCIDCardClass, CCID_CARD) /* * callbacks to be used by the CCID device (hw/usb-ccid.c) to call diff --git a/hw/usb/hcd-dwc2.h b/hw/usb/hcd-dwc2.h index 919e3e43b1..6998b04706 100644 --- a/hw/usb/hcd-dwc2.h +++ b/hw/usb/hcd-dwc2.h @@ -181,7 +181,6 @@ struct DWC2Class { }; #define TYPE_DWC2_USB "dwc2-usb" -DECLARE_OBJ_CHECKERS(DWC2State, DWC2Class, - DWC2_USB, TYPE_DWC2_USB) +OBJECT_DECLARE_TYPE(DWC2State, DWC2Class, DWC2_USB) #endif diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 1301ce0be7..199913bca5 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -350,10 +350,7 @@ struct EHCIPCIState { #define TYPE_PPC4xx_EHCI "ppc4xx-ehci-usb" #define TYPE_FUSBH200_EHCI "fusbh200-ehci-usb" -typedef struct EHCISysBusState EHCISysBusState; -typedef struct SysBusEHCIClass SysBusEHCIClass; -DECLARE_OBJ_CHECKERS(EHCISysBusState, SysBusEHCIClass, - SYS_BUS_EHCI, TYPE_SYS_BUS_EHCI) +OBJECT_DECLARE_TYPE(EHCISysBusState, SysBusEHCIClass, SYS_BUS_EHCI) struct EHCISysBusState { /*< private >*/ |