diff options
author | Stephen Boyd <swboyd@chromium.org> | 2019-05-14 22:40:53 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2019-05-24 23:39:27 +0200 |
commit | 7c71650f9a3640464dd907bd7a6510cc7ea02ba6 (patch) | |
tree | c1535955444800778e8910844471594bcf088aa0 /drivers/of | |
parent | of/fdt: Remove dead code and mark functions with __init (diff) | |
download | linux-7c71650f9a3640464dd907bd7a6510cc7ea02ba6.tar.xz linux-7c71650f9a3640464dd907bd7a6510cc7ea02ba6.zip |
of/fdt: Mark initial_boot_params as __ro_after_init
The FDT pointer, i.e. initial_boot_params, shouldn't be changed after
init. It's only set by boot code and then the only user of the FDT is
the raw sysfs reading API. Mark this pointer with __ro_after_init so
that the pointer can't be changed after init.
Cc: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/fdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 918098c9f72a..3d36b5afd9bd 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -516,7 +516,7 @@ EXPORT_SYMBOL_GPL(of_fdt_unflatten_tree); int __initdata dt_root_addr_cells; int __initdata dt_root_size_cells; -void *initial_boot_params; +void *initial_boot_params __ro_after_init; #ifdef CONFIG_OF_EARLY_FLATTREE |