Commit 7b482c83 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Rob Herring

ARM/of: allow *machine_desc.dt_compat to be const

This allows dt_compat to point to a constant list of compatible strings.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
parent 88af7f58
...@@ -19,7 +19,7 @@ struct machine_desc { ...@@ -19,7 +19,7 @@ struct machine_desc {
unsigned int nr; /* architecture number */ unsigned int nr; /* architecture number */
const char *name; /* architecture name */ const char *name; /* architecture name */
unsigned long atag_offset; /* tagged list (relative) */ unsigned long atag_offset; /* tagged list (relative) */
const char **dt_compat; /* array of device tree const char *const *dt_compat; /* array of device tree
* 'compatible' strings */ * 'compatible' strings */
unsigned int nr_irqs; /* number of IRQs */ unsigned int nr_irqs; /* number of IRQs */
......
...@@ -107,7 +107,7 @@ int of_fdt_is_compatible(struct boot_param_header *blob, ...@@ -107,7 +107,7 @@ int of_fdt_is_compatible(struct boot_param_header *blob,
* of_fdt_match - Return true if node matches a list of compatible values * of_fdt_match - Return true if node matches a list of compatible values
*/ */
int of_fdt_match(struct boot_param_header *blob, unsigned long node, int of_fdt_match(struct boot_param_header *blob, unsigned long node,
const char **compat) const char *const *compat)
{ {
unsigned int tmp, score = 0; unsigned int tmp, score = 0;
...@@ -541,7 +541,7 @@ int __init of_flat_dt_is_compatible(unsigned long node, const char *compat) ...@@ -541,7 +541,7 @@ int __init of_flat_dt_is_compatible(unsigned long node, const char *compat)
/** /**
* of_flat_dt_match - Return true if node matches a list of compatible values * of_flat_dt_match - Return true if node matches a list of compatible values
*/ */
int __init of_flat_dt_match(unsigned long node, const char **compat) int __init of_flat_dt_match(unsigned long node, const char *const *compat)
{ {
return of_fdt_match(initial_boot_params, node, compat); return of_fdt_match(initial_boot_params, node, compat);
} }
......
...@@ -71,7 +71,7 @@ extern int of_fdt_is_compatible(struct boot_param_header *blob, ...@@ -71,7 +71,7 @@ extern int of_fdt_is_compatible(struct boot_param_header *blob,
unsigned long node, unsigned long node,
const char *compat); const char *compat);
extern int of_fdt_match(struct boot_param_header *blob, unsigned long node, extern int of_fdt_match(struct boot_param_header *blob, unsigned long node,
const char **compat); const char *const *compat);
extern void of_fdt_unflatten_tree(unsigned long *blob, extern void of_fdt_unflatten_tree(unsigned long *blob,
struct device_node **mynodes); struct device_node **mynodes);
...@@ -88,7 +88,7 @@ extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname, ...@@ -88,7 +88,7 @@ extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname,
extern void *of_get_flat_dt_prop(unsigned long node, const char *name, extern void *of_get_flat_dt_prop(unsigned long node, const char *name,
unsigned long *size); unsigned long *size);
extern int of_flat_dt_is_compatible(unsigned long node, const char *name); extern int of_flat_dt_is_compatible(unsigned long node, const char *name);
extern int of_flat_dt_match(unsigned long node, const char **matches); extern int of_flat_dt_match(unsigned long node, const char *const *matches);
extern unsigned long of_get_flat_dt_root(void); extern unsigned long of_get_flat_dt_root(void);
extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment