]> git.proxmox.com Git - mirror_qemu.git/blobdiff - device_tree.c
milkymist-uart: convert to memory API
[mirror_qemu.git] / device_tree.c
index 21be07075929a92af80c4a04fd94a22547aaaa22..3a224d1e0fe6e02bb9925610e987ac58c4144243 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "config.h"
 #include "qemu-common.h"
-#include "sysemu.h"
 #include "device_tree.h"
 #include "hw/loader.h"
 
@@ -44,7 +43,7 @@ void *load_device_tree(const char *filename_path, int *sizep)
     /* Expand to 2x size to give enough room for manipulation.  */
     dt_size *= 2;
     /* First allocate space in qemu for device tree */
-    fdt = qemu_mallocz(dt_size);
+    fdt = g_malloc0(dt_size);
 
     dt_file_load_size = load_image(filename_path, fdt);
     if (dt_file_load_size < 0) {
@@ -69,7 +68,7 @@ void *load_device_tree(const char *filename_path, int *sizep)
     return fdt;
 
 fail:
-    qemu_free(fdt);
+    g_free(fdt);
     return NULL;
 }