summaryrefslogtreecommitdiffstats
path: root/include/hw/rtc/allwinner-rtc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/rtc/allwinner-rtc.h')
-rw-r--r--include/hw/rtc/allwinner-rtc.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/include/hw/rtc/allwinner-rtc.h b/include/hw/rtc/allwinner-rtc.h
index 7893f74795..5a6e9fff32 100644
--- a/include/hw/rtc/allwinner-rtc.h
+++ b/include/hw/rtc/allwinner-rtc.h
@@ -60,19 +60,17 @@
* @{
*/
-#define AW_RTC(obj) \
- OBJECT_CHECK(AwRtcState, (obj), TYPE_AW_RTC)
-#define AW_RTC_CLASS(klass) \
- OBJECT_CLASS_CHECK(AwRtcClass, (klass), TYPE_AW_RTC)
-#define AW_RTC_GET_CLASS(obj) \
- OBJECT_GET_CLASS(AwRtcClass, (obj), TYPE_AW_RTC)
+typedef struct AwRtcClass AwRtcClass;
+typedef struct AwRtcState AwRtcState;
+DECLARE_OBJ_CHECKERS(AwRtcState, AwRtcClass,
+ AW_RTC, TYPE_AW_RTC)
/** @} */
/**
* Allwinner RTC per-object instance state.
*/
-typedef struct AwRtcState {
+struct AwRtcState {
/*< private >*/
SysBusDevice parent_obj;
/*< public >*/
@@ -92,7 +90,7 @@ typedef struct AwRtcState {
/** Array of hardware registers */
uint32_t regs[AW_RTC_REGS_NUM];
-} AwRtcState;
+};
/**
* Allwinner RTC class-level struct.
@@ -101,7 +99,7 @@ typedef struct AwRtcState {
* such that the generic code can use this struct to support
* all devices.
*/
-typedef struct AwRtcClass {
+struct AwRtcClass {
/*< private >*/
SysBusDeviceClass parent_class;
/*< public >*/
@@ -129,6 +127,6 @@ typedef struct AwRtcClass {
*/
bool (*write)(AwRtcState *s, uint32_t offset, uint32_t data);
-} AwRtcClass;
+};
#endif /* HW_MISC_ALLWINNER_RTC_H */