]> git.baikalelectronics.ru Git - kernel.git/commit
OF: base: match each node compatible against all given matches first
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tue, 3 Dec 2013 13:52:00 +0000 (14:52 +0100)
committerRob Herring <rob.herring@calxeda.com>
Wed, 4 Dec 2013 19:12:43 +0000 (13:12 -0600)
commit902e0b5a72c9af36f0ba52bead30bcfb57bce9f2
treeda068ad9e86d3183abec81e5bf1582280e28b99c
parentcaca1588c557429defa4d6c6dc624767cff5d265
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: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
drivers/of/base.c