aboutsummaryrefslogtreecommitdiff
path: root/include/hw/watchdog/cmsdk-apb-watchdog.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/watchdog/cmsdk-apb-watchdog.h')
-rw-r--r--include/hw/watchdog/cmsdk-apb-watchdog.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/hw/watchdog/cmsdk-apb-watchdog.h b/include/hw/watchdog/cmsdk-apb-watchdog.h
index 6ae9531370..63f4becf86 100644
--- a/include/hw/watchdog/cmsdk-apb-watchdog.h
+++ b/include/hw/watchdog/cmsdk-apb-watchdog.h
@@ -33,10 +33,12 @@
#include "hw/sysbus.h"
#include "hw/ptimer.h"
+#include "qom/object.h"
#define TYPE_CMSDK_APB_WATCHDOG "cmsdk-apb-watchdog"
-#define CMSDK_APB_WATCHDOG(obj) OBJECT_CHECK(CMSDKAPBWatchdog, (obj), \
- TYPE_CMSDK_APB_WATCHDOG)
+typedef struct CMSDKAPBWatchdog CMSDKAPBWatchdog;
+DECLARE_INSTANCE_CHECKER(CMSDKAPBWatchdog, CMSDK_APB_WATCHDOG,
+ TYPE_CMSDK_APB_WATCHDOG)
/*
* This shares the same struct (and cast macro) as the base
@@ -44,7 +46,7 @@
*/
#define TYPE_LUMINARY_WATCHDOG "luminary-watchdog"
-typedef struct CMSDKAPBWatchdog {
+struct CMSDKAPBWatchdog {
/*< private >*/
SysBusDevice parent_obj;
@@ -62,6 +64,6 @@ typedef struct CMSDKAPBWatchdog {
uint32_t itop;
uint32_t resetstatus;
const uint32_t *id;
-} CMSDKAPBWatchdog;
+};
#endif