diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-05-13 16:33:56 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2015-05-28 13:00:25 -0500 |
commit | 3b1a2c97210b1edd1a999ff8c1f72ab28f7609f7 (patch) | |
tree | 80f16d5e2609d3260ef5fceeec7d31e143d454bf /drivers/of | |
parent | 3386e0fa905c31bf1dafa2cbe2ecceb7e5ce2e66 (diff) | |
download | linux-3b1a2c97210b1edd1a999ff8c1f72ab28f7609f7.tar.bz2 |
of/fdt: Make fdt blob input parameters of unflatten functions const
Operations to unflatten fdt blobs never modify the input blobs, hence
make them const. Now we no longer need to cast arbitrary const data to
"void *" when calling of_fdt_unflatten_tree().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/fdt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index cde35c5d0191..9628c4a77f76 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -168,7 +168,7 @@ static void *unflatten_dt_alloc(void **mem, unsigned long size, * @dad: Parent struct device_node * @fpsize: Size of the node path up at the current depth. */ -static void * unflatten_dt_node(void *blob, +static void * unflatten_dt_node(const void *blob, void *mem, int *poffset, struct device_node *dad, @@ -378,7 +378,7 @@ static void * unflatten_dt_node(void *blob, * @dt_alloc: An allocator that provides a virtual address to memory * for the resulting tree */ -static void __unflatten_device_tree(void *blob, +static void __unflatten_device_tree(const void *blob, struct device_node **mynodes, void * (*dt_alloc)(u64 size, u64 align)) { @@ -441,7 +441,7 @@ static void *kernel_tree_alloc(u64 size, u64 align) * pointers of the nodes so the normal device-tree walking functions * can be used. */ -void of_fdt_unflatten_tree(unsigned long *blob, +void of_fdt_unflatten_tree(const unsigned long *blob, struct device_node **mynodes) { __unflatten_device_tree(blob, mynodes, &kernel_tree_alloc); |