Files
twx-linux/include/linux
Johan Hovold 95cd1aacf9 of: add helper to lookup compatible child node
[ Upstream commit 36156f9241 ]

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:44:21 +01:00
..
…
…
2018-11-21 09:25:59 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2017-10-08 10:26:06 +02:00
…
…
…
2018-04-24 09:34:18 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2017-06-14 15:06:00 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-02-28 10:18:33 +01:00
…
…
2017-07-15 12:16:11 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2017-05-14 14:00:22 +02:00
…
…
…
2017-07-12 15:01:02 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
2017-08-06 18:59:43 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-04-24 09:34:12 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2016-10-20 15:51:28 +11:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-10-10 08:53:18 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2017-08-24 17:12:19 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2016-10-19 11:36:22 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-09-09 20:01:20 +02:00
…
…
…
…
…
2017-08-24 17:12:21 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2017-08-30 10:21:40 +02:00
2018-10-18 09:13:26 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2017-01-19 20:17:59 +01:00
…
…
…
…
…
…
…
…
2018-11-13 11:17:02 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-11-27 16:09:41 +01:00
…
…
…
…
2017-04-21 09:31:21 +02:00
…
…
…
…
…
…
…
…
…
…
…
2017-12-25 14:23:37 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…