]> Git Repo - qemu.git/blobdiff - device_tree.c
Sparc64: remove useless variable
[qemu.git] / device_tree.c
index e213323dc2c10d72d6e1674cc5c5126c40b25c10..3a224d1e0fe6e02bb9925610e987ac58c4144243 100644 (file)
@@ -20,8 +20,8 @@
 
 #include "config.h"
 #include "qemu-common.h"
-#include "sysemu.h"
 #include "device_tree.h"
+#include "hw/loader.h"
 
 #include <libfdt.h>
 
@@ -29,7 +29,6 @@ void *load_device_tree(const char *filename_path, int *sizep)
 {
     int dt_size;
     int dt_file_load_size;
-    int new_dt_size;
     int ret;
     void *fdt = NULL;
 
@@ -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,12 +68,12 @@ void *load_device_tree(const char *filename_path, int *sizep)
     return fdt;
 
 fail:
-    qemu_free(fdt);
+    g_free(fdt);
     return NULL;
 }
 
 int qemu_devtree_setprop(void *fdt, const char *node_path,
-                         const char *property, uint32_t *val_array, int size)
+                         const char *property, void *val_array, int size)
 {
     int offset;
 
This page took 0.025042 seconds and 4 git commands to generate.