From 14134f0eb57247e3ec3b8311931a11b344096591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 27 Jul 2013 12:47:09 +0200 Subject: ds1225y: Drop bogus qdev field from NvRamState MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is not a device, and the field is not used from code either. Signed-off-by: Andreas Färber --- hw/nvram/ds1225y.c | 1 - 1 file changed, 1 deletion(-) (limited to 'hw/nvram') diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c index fa218ce704..cca6f4385b 100644 --- a/hw/nvram/ds1225y.c +++ b/hw/nvram/ds1225y.c @@ -26,7 +26,6 @@ #include "trace.h" typedef struct { - DeviceState qdev; MemoryRegion iomem; uint32_t chip_size; char *filename; -- cgit v1.2.3 From 8c1892cf7297ff4972a4ad6dd601921c3a01d618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 27 Jul 2013 12:50:29 +0200 Subject: ds1225y: QOM cast cleanup for SysBusNvRamState MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Färber --- hw/nvram/ds1225y.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'hw/nvram') diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c index cca6f4385b..f9a700b01c 100644 --- a/hw/nvram/ds1225y.c +++ b/hw/nvram/ds1225y.c @@ -104,14 +104,19 @@ static const VMStateDescription vmstate_nvram = { } }; +#define TYPE_DS1225Y "ds1225y" +#define DS1225Y(obj) OBJECT_CHECK(SysBusNvRamState, (obj), TYPE_DS1225Y) + typedef struct { - SysBusDevice busdev; + SysBusDevice parent_obj; + NvRamState nvram; } SysBusNvRamState; static int nvram_sysbus_initfn(SysBusDevice *dev) { - NvRamState *s = &FROM_SYSBUS(SysBusNvRamState, dev)->nvram; + SysBusNvRamState *sys = DS1225Y(dev); + NvRamState *s = &sys->nvram; FILE *file; s->contents = g_malloc0(s->chip_size); @@ -151,7 +156,7 @@ static void nvram_sysbus_class_init(ObjectClass *klass, void *data) } static const TypeInfo nvram_sysbus_info = { - .name = "ds1225y", + .name = TYPE_DS1225Y, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(SysBusNvRamState), .class_init = nvram_sysbus_class_init, -- cgit v1.2.3