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 /include/hw/timer | |
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 'include/hw/timer')
-rw-r--r-- | include/hw/timer/aspeed_timer.h | 5 | ||||
-rw-r--r-- | include/hw/timer/i8254.h | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/include/hw/timer/aspeed_timer.h b/include/hw/timer/aspeed_timer.h index 4c76f955c9..d36034a10c 100644 --- a/include/hw/timer/aspeed_timer.h +++ b/include/hw/timer/aspeed_timer.h @@ -27,10 +27,7 @@ #include "qom/object.h" #define TYPE_ASPEED_TIMER "aspeed.timer" -typedef struct AspeedTimerClass AspeedTimerClass; -typedef struct AspeedTimerCtrlState AspeedTimerCtrlState; -DECLARE_OBJ_CHECKERS(AspeedTimerCtrlState, AspeedTimerClass, - ASPEED_TIMER, TYPE_ASPEED_TIMER) +OBJECT_DECLARE_TYPE(AspeedTimerCtrlState, AspeedTimerClass, ASPEED_TIMER) #define TYPE_ASPEED_2400_TIMER TYPE_ASPEED_TIMER "-ast2400" #define TYPE_ASPEED_2500_TIMER TYPE_ASPEED_TIMER "-ast2500" #define TYPE_ASPEED_2600_TIMER TYPE_ASPEED_TIMER "-ast2600" diff --git a/include/hw/timer/i8254.h b/include/hw/timer/i8254.h index 1a522a2457..3e569f42b6 100644 --- a/include/hw/timer/i8254.h +++ b/include/hw/timer/i8254.h @@ -40,10 +40,7 @@ typedef struct PITChannelInfo { } PITChannelInfo; #define TYPE_PIT_COMMON "pit-common" -typedef struct PITCommonState PITCommonState; -typedef struct PITCommonClass PITCommonClass; -DECLARE_OBJ_CHECKERS(PITCommonState, PITCommonClass, - PIT_COMMON, TYPE_PIT_COMMON) +OBJECT_DECLARE_TYPE(PITCommonState, PITCommonClass, PIT_COMMON) #define TYPE_I8254 "isa-pit" #define TYPE_KVM_I8254 "kvm-pit" |