diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-16 14:25:19 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-18 14:12:32 -0400 |
commit | 8063396bf3459a810d24e3efd6110b8480f0de5b (patch) | |
tree | 40f85f15d7016e3ee66916a59be53d2b2c71510a /hw/rtc | |
parent | a489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (diff) |
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
This converts existing DECLARE_INSTANCE_CHECKER usage to
OBJECT_DECLARE_SIMPLE_TYPE when possible.
$ ./scripts/codeconverter/converter.py -i \
--pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]')
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Paul Durrant <paul@xen.org>
Message-Id: <20200916182519.415636-6-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/rtc')
-rw-r--r-- | hw/rtc/ds1338.c | 4 | ||||
-rw-r--r-- | hw/rtc/exynos4210_rtc.c | 4 | ||||
-rw-r--r-- | hw/rtc/m41t80.c | 4 | ||||
-rw-r--r-- | hw/rtc/sun4v-rtc.c | 4 | ||||
-rw-r--r-- | hw/rtc/twl92230.c | 4 |
5 files changed, 5 insertions, 15 deletions
diff --git a/hw/rtc/ds1338.c b/hw/rtc/ds1338.c index 10fac3d9c9..bc5ce1a9f4 100644 --- a/hw/rtc/ds1338.c +++ b/hw/rtc/ds1338.c @@ -30,9 +30,7 @@ #define CTRL_OSF 0x20 #define TYPE_DS1338 "ds1338" -typedef struct DS1338State DS1338State; -DECLARE_INSTANCE_CHECKER(DS1338State, DS1338, - TYPE_DS1338) +OBJECT_DECLARE_SIMPLE_TYPE(DS1338State, DS1338) struct DS1338State { I2CSlave parent_obj; diff --git a/hw/rtc/exynos4210_rtc.c b/hw/rtc/exynos4210_rtc.c index f8a4fe8a47..4c97624478 100644 --- a/hw/rtc/exynos4210_rtc.c +++ b/hw/rtc/exynos4210_rtc.c @@ -85,9 +85,7 @@ #define RTC_BASE_FREQ 32768 #define TYPE_EXYNOS4210_RTC "exynos4210.rtc" -typedef struct Exynos4210RTCState Exynos4210RTCState; -DECLARE_INSTANCE_CHECKER(Exynos4210RTCState, EXYNOS4210_RTC, - TYPE_EXYNOS4210_RTC) +OBJECT_DECLARE_SIMPLE_TYPE(Exynos4210RTCState, EXYNOS4210_RTC) struct Exynos4210RTCState { SysBusDevice parent_obj; diff --git a/hw/rtc/m41t80.c b/hw/rtc/m41t80.c index 0b7048c3f4..396d110ba2 100644 --- a/hw/rtc/m41t80.c +++ b/hw/rtc/m41t80.c @@ -17,9 +17,7 @@ #include "qom/object.h" #define TYPE_M41T80 "m41t80" -typedef struct M41t80State M41t80State; -DECLARE_INSTANCE_CHECKER(M41t80State, M41T80, - TYPE_M41T80) +OBJECT_DECLARE_SIMPLE_TYPE(M41t80State, M41T80) struct M41t80State { I2CSlave parent_obj; diff --git a/hw/rtc/sun4v-rtc.c b/hw/rtc/sun4v-rtc.c index 18979d25d0..e037acd1b5 100644 --- a/hw/rtc/sun4v-rtc.c +++ b/hw/rtc/sun4v-rtc.c @@ -20,9 +20,7 @@ #define TYPE_SUN4V_RTC "sun4v_rtc" -typedef struct Sun4vRtc Sun4vRtc; -DECLARE_INSTANCE_CHECKER(Sun4vRtc, SUN4V_RTC, - TYPE_SUN4V_RTC) +OBJECT_DECLARE_SIMPLE_TYPE(Sun4vRtc, SUN4V_RTC) struct Sun4vRtc { SysBusDevice parent_obj; diff --git a/hw/rtc/twl92230.c b/hw/rtc/twl92230.c index 4f83eff5c3..f838913b37 100644 --- a/hw/rtc/twl92230.c +++ b/hw/rtc/twl92230.c @@ -34,9 +34,7 @@ #define VERBOSE 1 #define TYPE_TWL92230 "twl92230" -typedef struct MenelausState MenelausState; -DECLARE_INSTANCE_CHECKER(MenelausState, TWL92230, - TYPE_TWL92230) +OBJECT_DECLARE_SIMPLE_TYPE(MenelausState, TWL92230) struct MenelausState { I2CSlave parent_obj; |