aboutsummaryrefslogtreecommitdiff
path: root/include/hw/rtc
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-09-16 14:25:19 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-18 14:12:32 -0400
commit8063396bf3459a810d24e3efd6110b8480f0de5b (patch)
tree40f85f15d7016e3ee66916a59be53d2b2c71510a /include/hw/rtc
parenta489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (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 'include/hw/rtc')
-rw-r--r--include/hw/rtc/aspeed_rtc.h4
-rw-r--r--include/hw/rtc/goldfish_rtc.h4
-rw-r--r--include/hw/rtc/mc146818rtc.h4
-rw-r--r--include/hw/rtc/pl031.h4
-rw-r--r--include/hw/rtc/xlnx-zynqmp-rtc.h4
5 files changed, 5 insertions, 15 deletions
diff --git a/include/hw/rtc/aspeed_rtc.h b/include/hw/rtc/aspeed_rtc.h
index d7691ab88f..df61e46059 100644
--- a/include/hw/rtc/aspeed_rtc.h
+++ b/include/hw/rtc/aspeed_rtc.h
@@ -21,10 +21,8 @@ struct AspeedRtcState {
int offset;
};
-typedef struct AspeedRtcState AspeedRtcState;
#define TYPE_ASPEED_RTC "aspeed.rtc"
-DECLARE_INSTANCE_CHECKER(AspeedRtcState, ASPEED_RTC,
- TYPE_ASPEED_RTC)
+OBJECT_DECLARE_SIMPLE_TYPE(AspeedRtcState, ASPEED_RTC)
#endif /* HW_RTC_ASPEED_RTC_H */
diff --git a/include/hw/rtc/goldfish_rtc.h b/include/hw/rtc/goldfish_rtc.h
index b710c21c94..79ca7daf5d 100644
--- a/include/hw/rtc/goldfish_rtc.h
+++ b/include/hw/rtc/goldfish_rtc.h
@@ -26,9 +26,7 @@
#include "qom/object.h"
#define TYPE_GOLDFISH_RTC "goldfish_rtc"
-typedef struct GoldfishRTCState GoldfishRTCState;
-DECLARE_INSTANCE_CHECKER(GoldfishRTCState, GOLDFISH_RTC,
- TYPE_GOLDFISH_RTC)
+OBJECT_DECLARE_SIMPLE_TYPE(GoldfishRTCState, GOLDFISH_RTC)
struct GoldfishRTCState {
SysBusDevice parent_obj;
diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h
index e58e006d0d..6224b5276a 100644
--- a/include/hw/rtc/mc146818rtc.h
+++ b/include/hw/rtc/mc146818rtc.h
@@ -16,9 +16,7 @@
#include "qom/object.h"
#define TYPE_MC146818_RTC "mc146818rtc"
-typedef struct RTCState RTCState;
-DECLARE_INSTANCE_CHECKER(RTCState, MC146818_RTC,
- TYPE_MC146818_RTC)
+OBJECT_DECLARE_SIMPLE_TYPE(RTCState, MC146818_RTC)
struct RTCState {
ISADevice parent_obj;
diff --git a/include/hw/rtc/pl031.h b/include/hw/rtc/pl031.h
index 3897b424d4..9fd4be1abb 100644
--- a/include/hw/rtc/pl031.h
+++ b/include/hw/rtc/pl031.h
@@ -19,9 +19,7 @@
#include "qom/object.h"
#define TYPE_PL031 "pl031"
-typedef struct PL031State PL031State;
-DECLARE_INSTANCE_CHECKER(PL031State, PL031,
- TYPE_PL031)
+OBJECT_DECLARE_SIMPLE_TYPE(PL031State, PL031)
struct PL031State {
SysBusDevice parent_obj;
diff --git a/include/hw/rtc/xlnx-zynqmp-rtc.h b/include/hw/rtc/xlnx-zynqmp-rtc.h
index 209de85ae6..5f1ad0a946 100644
--- a/include/hw/rtc/xlnx-zynqmp-rtc.h
+++ b/include/hw/rtc/xlnx-zynqmp-rtc.h
@@ -33,9 +33,7 @@
#define TYPE_XLNX_ZYNQMP_RTC "xlnx-zynmp.rtc"
-typedef struct XlnxZynqMPRTC XlnxZynqMPRTC;
-DECLARE_INSTANCE_CHECKER(XlnxZynqMPRTC, XLNX_ZYNQMP_RTC,
- TYPE_XLNX_ZYNQMP_RTC)
+OBJECT_DECLARE_SIMPLE_TYPE(XlnxZynqMPRTC, XLNX_ZYNQMP_RTC)
REG32(SET_TIME_WRITE, 0x0)
REG32(SET_TIME_READ, 0x4)