fdt: Update fdt_get_base_address() to use const
authorSimon Glass <sjg@chromium.org>
Fri, 19 May 2017 02:09:00 +0000 (20:09 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 1 Jun 2017 13:03:07 +0000 (07:03 -0600)
This function does not change the device tree so adjust it to use const
for this parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/fdt_support.c
include/fdt_support.h

index c6a76b7..c63b27b 100644 (file)
@@ -1539,7 +1539,7 @@ int fdt_verify_alias_address(void *fdt, int anode, const char *alias, u64 addr)
 /*
  * Returns the base address of an SOC or PCI node
  */
-u64 fdt_get_base_address(void *fdt, int node)
+u64 fdt_get_base_address(const void *fdt, int node)
 {
        int size;
        u32 naddr;
index 955c121..6fea5c7 100644 (file)
@@ -207,7 +207,7 @@ int fdt_add_edid(void *blob, const char *compat, unsigned char *buf);
 
 int fdt_verify_alias_address(void *fdt, int anode, const char *alias,
                              u64 addr);
-u64 fdt_get_base_address(void *fdt, int node);
+u64 fdt_get_base_address(const void *fdt, int node);
 int fdt_read_range(void *fdt, int node, int n, uint64_t *child_addr,
                   uint64_t *addr, uint64_t *len);