vmstate: Add pre/post_save() hooks
[qemu] / hw / m48t59.c
index 6541cbe..0fcf4f8 100644 (file)
@@ -565,13 +565,13 @@ static uint32_t nvram_readl (void *opaque, target_phys_addr_t addr)
     return retval;
 }
 
-static CPUWriteMemoryFunc *nvram_write[] = {
+static CPUWriteMemoryFunc * const nvram_write[] = {
     &nvram_writeb,
     &nvram_writew,
     &nvram_writel,
 };
 
-static CPUReadMemoryFunc *nvram_read[] = {
+static CPUReadMemoryFunc * const nvram_read[] = {
     &nvram_readb,
     &nvram_readw,
     &nvram_readl,
@@ -642,7 +642,7 @@ m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base,
     return d;
 }
 
-static void m48t59_init1(SysBusDevice *dev)
+static int m48t59_init1(SysBusDevice *dev)
 {
     m48t59_t *s = FROM_SYSBUS(m48t59_t, dev);
     int mem_index;
@@ -661,6 +661,7 @@ static void m48t59_init1(SysBusDevice *dev)
 
     qemu_register_reset(m48t59_reset, s);
     register_savevm("m48t59", -1, 1, m48t59_save, m48t59_load, s);
+    return 0;
 }
 
 static SysBusDeviceInfo m48t59_info = {