Commit e55b0829 authored by Fabio Estevam's avatar Fabio Estevam Committed by Rob Herring

of: fdt: Constify 'pathp'

Constify 'pathp' in order to get rid of the following warning:

drivers/of/fdt.c:491:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
[Rob Herring: also constify np and lp]
Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
parent c22618a1
...@@ -460,7 +460,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node, ...@@ -460,7 +460,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
do { do {
u32 tag = be32_to_cpup((__be32 *)p); u32 tag = be32_to_cpup((__be32 *)p);
char *pathp; const char *pathp;
p += 4; p += 4;
if (tag == OF_DT_END_NODE) { if (tag == OF_DT_END_NODE) {
...@@ -488,7 +488,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node, ...@@ -488,7 +488,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
pathp = (char *)p; pathp = (char *)p;
p = ALIGN(p + strlen(pathp) + 1, 4); p = ALIGN(p + strlen(pathp) + 1, 4);
if ((*pathp) == '/') { if ((*pathp) == '/') {
char *lp, *np; const char *lp, *np;
for (lp = NULL, np = pathp; *np; np++) for (lp = NULL, np = pathp; *np; np++)
if ((*np) == '/') if ((*np) == '/')
lp = np+1; lp = np+1;
......
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