]> git.proxmox.com Git - qemu.git/blobdiff - hw/onenand.c
vmstate, memory: decouple vmstate from memory API
[qemu.git] / hw / onenand.c
index a9d8d677ee75d4cc7536803bc96092352c57a75b..33c97186293c5b0c12c99bc46ec8c31ee969eca1 100644 (file)
@@ -781,7 +781,8 @@ static int onenand_initfn(SysBusDevice *dev)
     }
     s->otp = memset(g_malloc((64 + 2) << PAGE_SHIFT),
                     0xff, (64 + 2) << PAGE_SHIFT);
-    memory_region_init_ram(&s->ram, NULL, "onenand.ram", 0xc000 << s->shift);
+    memory_region_init_ram(&s->ram, "onenand.ram", 0xc000 << s->shift);
+    vmstate_register_ram_global(&s->ram);
     ram = memory_region_get_ram_ptr(&s->ram);
     s->boot[0] = ram + (0x0000 << s->shift);
     s->boot[1] = ram + (0x8000 << s->shift);