summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/device_tree.h4
-rw-r--r--src/lib/device_tree.c4
-rw-r--r--src/soc/cavium/cn81xx/soc.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/include/device_tree.h b/src/include/device_tree.h
index e3723c86ac..d9d9613f96 100644
--- a/src/include/device_tree.h
+++ b/src/include/device_tree.h
@@ -52,7 +52,7 @@ struct fdt_header {
struct fdt_property
{
const char *name;
- const void *data;
+ void *data;
uint32_t size;
};
@@ -165,7 +165,7 @@ void dt_write_int(u8 *dest, u64 src, size_t length);
void dt_delete_prop(struct device_tree_node *node, const char *name);
// Add different kinds of properties to a node, or update existing ones.
void dt_add_bin_prop(struct device_tree_node *node, const char *name,
- const void *data, size_t size);
+ void *data, size_t size);
void dt_add_string_prop(struct device_tree_node *node, const char *name,
const char *str);
void dt_add_u32_prop(struct device_tree_node *node, const char *name, u32 val);
diff --git a/src/lib/device_tree.c b/src/lib/device_tree.c
index 3c4bd24462..a5021ca8fd 100644
--- a/src/lib/device_tree.c
+++ b/src/lib/device_tree.c
@@ -883,7 +883,7 @@ void dt_delete_prop(struct device_tree_node *node, const char *name)
* @param size The size of data in bytes.
*/
void dt_add_bin_prop(struct device_tree_node *node, const char *name,
- const void *data, size_t size)
+ void *data, size_t size)
{
struct device_tree_property *prop;
@@ -955,7 +955,7 @@ void dt_find_bin_prop(const struct device_tree_node *node, const char *name,
void dt_add_string_prop(struct device_tree_node *node, const char *name,
const char *str)
{
- dt_add_bin_prop(node, name, str, strlen(str) + 1);
+ dt_add_bin_prop(node, name, (char *)str, strlen(str) + 1);
}
/*
diff --git a/src/soc/cavium/cn81xx/soc.c b/src/soc/cavium/cn81xx/soc.c
index efe7d6d204..f1e11d335b 100644
--- a/src/soc/cavium/cn81xx/soc.c
+++ b/src/soc/cavium/cn81xx/soc.c
@@ -149,7 +149,7 @@ static void dt_platform_fixup_mac(struct device_tree_node *node)
if (*localmac)
return;
if (used_mac < num_free_mac_addresses) {
- const u64 genmac = next_free_mac_address + used_mac;
+ u64 genmac = next_free_mac_address + used_mac;
dt_add_bin_prop(node, name, &genmac, 6);
used_mac++;
return;