aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/hcd-ehci.h
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-31 17:07:33 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-09 09:27:09 -0400
commit8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch)
tree6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /hw/usb/hcd-ehci.h
parentdb1015e92e04835c9eb50c29625fe566d1202dbd (diff)
Use DECLARE_*CHECKER* macros
Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-12-ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-13-ehabkost@redhat.com> Message-Id: <20200831210740.126168-14-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/usb/hcd-ehci.h')
-rw-r--r--hw/usb/hcd-ehci.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h
index c12c9bae46..1301ce0be7 100644
--- a/hw/usb/hcd-ehci.h
+++ b/hw/usb/hcd-ehci.h
@@ -330,7 +330,8 @@ void ehci_reset(void *opaque);
#define TYPE_PCI_EHCI "pci-ehci-usb"
typedef struct EHCIPCIState EHCIPCIState;
-#define PCI_EHCI(obj) OBJECT_CHECK(EHCIPCIState, (obj), TYPE_PCI_EHCI)
+DECLARE_INSTANCE_CHECKER(EHCIPCIState, PCI_EHCI,
+ TYPE_PCI_EHCI)
struct EHCIPCIState {
/*< private >*/
@@ -351,12 +352,8 @@ struct EHCIPCIState {
typedef struct EHCISysBusState EHCISysBusState;
typedef struct SysBusEHCIClass SysBusEHCIClass;
-#define SYS_BUS_EHCI(obj) \
- OBJECT_CHECK(EHCISysBusState, (obj), TYPE_SYS_BUS_EHCI)
-#define SYS_BUS_EHCI_CLASS(class) \
- OBJECT_CLASS_CHECK(SysBusEHCIClass, (class), TYPE_SYS_BUS_EHCI)
-#define SYS_BUS_EHCI_GET_CLASS(obj) \
- OBJECT_GET_CLASS(SysBusEHCIClass, (obj), TYPE_SYS_BUS_EHCI)
+DECLARE_OBJ_CHECKERS(EHCISysBusState, SysBusEHCIClass,
+ SYS_BUS_EHCI, TYPE_SYS_BUS_EHCI)
struct EHCISysBusState {
/*< private >*/
@@ -378,8 +375,8 @@ struct SysBusEHCIClass {
};
typedef struct FUSBH200EHCIState FUSBH200EHCIState;
-#define FUSBH200_EHCI(obj) \
- OBJECT_CHECK(FUSBH200EHCIState, (obj), TYPE_FUSBH200_EHCI)
+DECLARE_INSTANCE_CHECKER(FUSBH200EHCIState, FUSBH200_EHCI,
+ TYPE_FUSBH200_EHCI)
struct FUSBH200EHCIState {
/*< private >*/