of: fix CONFIG_OF=n prototype of of_node_full_name()
PATCH 1/1 of: fix CONFIG_OF=n prototype of of_node_full_name()
Make the CONFIG_OF=n prototpe of of_node_full_name() mateh the CONFIG_OF=y version.
Fixes compile warnings like this:
sound/soc/soc-core.c: In function 'soc_check_aux_dev':sound/soc/soc-core.c:1667:3: warning: passing argument 1 of 'of_node_full_name' discards 'const' qualifier from pointer target type [enabled by default]
codecname = of_node_full_name(aux_dev->codec_of_node);
when CONFIG_OF is not defined.
--- include/linux/of.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/of.h +1 -1
@@ -349,7 +349,7 @@ int of_device_is_stdout_path(struct device_node *dn);#else /* CONFIG_OF */ -static inline const char *of_node_full_name (struct device_node *np) +static inline const char *of_node_full_name (const struct device_node *np) {return "<no-node>" ; }
Signature · 5 lines
2.0.0.rc2 -- Cheers, Stephen Rothwell [email protected]
Quoted 10 lines · Stephen Rothwell
Make the
CONFIG_OF=nprototpe ofof_node_full_name()mateh theCONFIG_OF=yversion.Fixes compile warnings like this:
sound/soc/soc-core.c: In function 'soc_check_aux_dev':sound/soc/soc-core.c:1667:3: warning: passing argument 1 of 'of_node_full_name' discards 'const' qualifier from pointer target type [enabled by default]
codecname =of_node_full_name(aux_dev->codec_of_node);when
CONFIG_OFis not defined.
Good catch, thanks. Applied and will be sent to Linus shortly.
g.
Quoted 25 lines
Signed-off-by Stephen Rothwell <[email protected]>--- include/linux/of.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/of.h +1
-1@@ -349,7 +349,7 @@ int of_device_is_stdout_path(struct device_node *dn);#else /* CONFIG_OF */ -static inline const char *of_node_full_name (struct device_node *np) +static inline const char *of_node_full_name (const struct device_node *np) {return "<no-node>" ; }Signature · 5 lines
2.0.0.rc2 -- Cheers, Stephen Rothwell [email protected]