aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/devtree.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-07-26 09:55:59 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-07-26 09:55:59 -0400
commitff69a4c855066592f9e293cff8f54813614dd544 (patch)
treec1fcee172f8bfb62c7c6b970b0c9f57ae35f9df4 /arch/arm/kernel/devtree.c
parent3b2f64d00c46e1e4e9bd0bb9bb12619adac27a4b (diff)
ARM: constify machine_desc structure uses
struct machine_desc records are defined everywhere as a 'const' structure, but unfortuantely it loses its const-ness through the use of linker magic - the symbols which surround the section are not declared const so it becomes possible not to use 'const' for pointers to these const structures. Let's fix this oversight - all pointers to these structures should be marked const too. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/devtree.c')
-rw-r--r--arch/arm/kernel/devtree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 5859c8bc727c..eae1976f859d 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -176,10 +176,10 @@ void __init arm_dt_init_cpu_maps(void)
176 * If a dtb was passed to the kernel in r2, then use it to choose the 176 * If a dtb was passed to the kernel in r2, then use it to choose the
177 * correct machine_desc and to setup the system. 177 * correct machine_desc and to setup the system.
178 */ 178 */
179struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) 179const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
180{ 180{
181 struct boot_param_header *devtree; 181 struct boot_param_header *devtree;
182 struct machine_desc *mdesc, *mdesc_best = NULL; 182 const struct machine_desc *mdesc, *mdesc_best = NULL;
183 unsigned int score, mdesc_score = ~1; 183 unsigned int score, mdesc_score = ~1;
184 unsigned long dt_root; 184 unsigned long dt_root;
185 const char *model; 185 const char *model;
@@ -188,7 +188,7 @@ struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
188 DT_MACHINE_START(GENERIC_DT, "Generic DT based system") 188 DT_MACHINE_START(GENERIC_DT, "Generic DT based system")
189 MACHINE_END 189 MACHINE_END
190 190
191 mdesc_best = (struct machine_desc *)&__mach_desc_GENERIC_DT; 191 mdesc_best = &__mach_desc_GENERIC_DT;
192#endif 192#endif
193 193
194 if (!dt_phys) 194 if (!dt_phys)