aboutsummaryrefslogtreecommitdiff
path: root/backends/hostmem-ram.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/hostmem-ram.c')
-rw-r--r--backends/hostmem-ram.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/backends/hostmem-ram.c b/backends/hostmem-ram.c
index bba2ebcce8..d9a8290dc9 100644
--- a/backends/hostmem-ram.c
+++ b/backends/hostmem-ram.c
@@ -16,9 +16,8 @@
static void
-ram_backend_memory_init(UserCreatable *uc, Error **errp)
+ram_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
{
- HostMemoryBackend *backend = MEMORY_BACKEND(uc);
char *path;
if (!backend->size) {
@@ -35,9 +34,9 @@ ram_backend_memory_init(UserCreatable *uc, Error **errp)
static void
ram_backend_class_init(ObjectClass *oc, void *data)
{
- UserCreatableClass *ucc = USER_CREATABLE_CLASS(oc);
+ HostMemoryBackendClass *bc = MEMORY_BACKEND_CLASS(oc);
- ucc->complete = ram_backend_memory_init;
+ bc->alloc = ram_backend_memory_alloc;
}
static const TypeInfo ram_backend_info = {