aboutsummaryrefslogtreecommitdiff
path: root/hw/rtc/twl92230.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/rtc/twl92230.c')
-rw-r--r--hw/rtc/twl92230.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/rtc/twl92230.c b/hw/rtc/twl92230.c
index d0011be89e..4f83eff5c3 100644
--- a/hw/rtc/twl92230.c
+++ b/hw/rtc/twl92230.c
@@ -29,13 +29,16 @@
#include "sysemu/sysemu.h"
#include "qemu/bcd.h"
#include "qemu/module.h"
+#include "qom/object.h"
#define VERBOSE 1
#define TYPE_TWL92230 "twl92230"
-#define TWL92230(obj) OBJECT_CHECK(MenelausState, (obj), TYPE_TWL92230)
+typedef struct MenelausState MenelausState;
+DECLARE_INSTANCE_CHECKER(MenelausState, TWL92230,
+ TYPE_TWL92230)
-typedef struct MenelausState {
+struct MenelausState {
I2CSlave parent_obj;
int firstbyte;
@@ -71,7 +74,7 @@ typedef struct MenelausState {
uint16_t rtc_next_vmstate;
qemu_irq out[4];
uint8_t pwrbtn_state;
-} MenelausState;
+};
static inline void menelaus_update(MenelausState *s)
{