Skip to content
Commit 10535314 authored by Sebastian Hesselbarth's avatar Sebastian Hesselbarth Committed by Rob Herring
Browse files

OF: base: match each node compatible against all given matches first



Currently, of_match_node compares each given match against all node's
compatible strings with of_device_is_compatible.

To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and also
an alphabetical ordering is more sane there.

Therefore, this patch modifies of_match_node to match each of the node's
compatible strings against all given matches first, before checking the
next compatible string. This implies that node's compatibles are ordered
from specific to generic while given matches can be in any order.

Signed-off-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: default avatarMeelis Roos <mroos@linux.ee>
Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
parent 3ab72f91
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