From 8063396bf3459a810d24e3efd6110b8480f0de5b Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 16 Sep 2020 14:25:19 -0400 Subject: 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 Acked-by: Paul Durrant Message-Id: <20200916182519.415636-6-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- hw/rtc/ds1338.c | 4 +--- hw/rtc/exynos4210_rtc.c | 4 +--- hw/rtc/m41t80.c | 4 +--- hw/rtc/sun4v-rtc.c | 4 +--- hw/rtc/twl92230.c | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) (limited to 'hw/rtc') diff --git a/hw/rtc/ds1338.c b/hw/rtc/ds1338.c index 10fac3d..bc5ce1a 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 f8a4fe8..4c97624 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 0b7048c..396d110 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 18979d2..e037acd 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 4f83eff..f838913 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; -- cgit v1.1