aboutsummaryrefslogtreecommitdiff
path: root/hw/nvram/ds1225y.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/nvram/ds1225y.c')
-rw-r--r--hw/nvram/ds1225y.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c
index d5cb922287..44fb7a94d3 100644
--- a/hw/nvram/ds1225y.c
+++ b/hw/nvram/ds1225y.c
@@ -29,6 +29,7 @@
#include "trace.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
+#include "qom/object.h"
typedef struct {
MemoryRegion iomem;
@@ -109,13 +110,15 @@ static const VMStateDescription vmstate_nvram = {
};
#define TYPE_DS1225Y "ds1225y"
-#define DS1225Y(obj) OBJECT_CHECK(SysBusNvRamState, (obj), TYPE_DS1225Y)
+typedef struct SysBusNvRamState SysBusNvRamState;
+DECLARE_INSTANCE_CHECKER(SysBusNvRamState, DS1225Y,
+ TYPE_DS1225Y)
-typedef struct {
+struct SysBusNvRamState {
SysBusDevice parent_obj;
NvRamState nvram;
-} SysBusNvRamState;
+};
static void nvram_sysbus_realize(DeviceState *dev, Error **errp)
{