]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/of: Constify device_node->name and ->path_component_name
authorGrant Likely <grant.likely@secretlab.ca>
Wed, 14 Nov 2012 22:37:12 +0000 (22:37 +0000)
committerGrant Likely <grant.likely@secretlab.ca>
Sat, 17 Nov 2012 12:05:57 +0000 (12:05 +0000)
commitc22618a11d1ba2966bd2cfd5e4918ed4f2dad13e
treee317e1413afd8f80ea4ddc036703ff447c1c0901
parent31982e52f0f5d6d51e69d5c4c4a7be5d52307c6e
drivers/of: Constify device_node->name and ->path_component_name

Neither of these should ever be changed once set. Make them const and
fix up the users that try to modify it in-place. In one case
kmalloc+memcpy is replaced with kstrdup() to avoid modifying the string.

Build tested with defconfigs on ARM, PowerPC, Sparc, MIPS, x86 among
others.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Julian Calaby <julian.calaby@gmail.com>
arch/powerpc/platforms/powermac/pfunc_core.c
arch/powerpc/platforms/pseries/reconfig.c
arch/powerpc/sysdev/fsl_pci.c
arch/sparc/kernel/pci_impl.h
drivers/of/fdt.c
include/linux/of.h