android_kernel_oneplus_msm8998/drivers/of
Johan Hovold f3e3c50c36 of: add helper to lookup compatible child node
[ Upstream commit 36156f9241cb0f9e37d998052873ca7501ad4b36 ]

Add of_get_compatible_child() helper that can be used to lookup
compatible child nodes.

Several drivers currently use of_find_compatible_node() to lookup child
nodes while failing to notice that the of_find_ functions search the
entire tree depth-first (from a given start node) and therefore can
match unrelated nodes. The fact that these functions also drop a
reference to the node they start searching from (e.g. the parent node)
is typically also overlooked, something which can lead to use-after-free
bugs.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-12-01 09:46:35 +01:00
..
unittest-data
address.c
base.c of: add helper to lookup compatible child node 2018-12-01 09:46:35 +01:00
device.c of: fix of_device_get_modalias returned length when truncating buffers 2018-03-22 09:23:21 +01:00
dynamic.c
fdt.c
fdt_address.c
irq.c
Kconfig
Makefile
of_mdio.c
of_mtd.c
of_net.c
of_pci.c
of_pci_irq.c
of_private.h
of_reserved_mem.c
overlay.c
pdt.c
platform.c
resolver.c
unittest.c of: unittest: Disable interrupt node tests for old world MAC systems 2018-10-13 09:11:33 +02:00