On Tue, Dec 3, 2013 at 7:52 AM, Sebastian Hesselbarth <sebastian.hesselbarth@xxxxxxxxx> wrote: > 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@xxxxxxxxx> > --- > Changelog: > v1->v2: > - Allow checks against nodes with no compatible (Reported by Rob Herring) > - Add some comments > > Cc: Grant Likely <grant.likely@xxxxxxxxxx> > Cc: Rob Herring <rob.herring@xxxxxxxxxxx> > Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> > Cc: Russell King <linux@xxxxxxxxxxxxxxxx> > Cc: Thierry Reding <thierry.reding@xxxxxxxxx> > Cc: Meelis Roos <mroos@xxxxxxxx> > Cc: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> > Cc: Scott Wood <scottwood@xxxxxxxxxxxxx> > Cc: devicetree@xxxxxxxxxxxxxxx > Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx > Cc: linux-kernel@xxxxxxxxxxxxxxx > --- > drivers/of/base.c | 53 +++++++++++++++++++++++++++++++++++++---------------- > 1 files changed, 37 insertions(+), 16 deletions(-) Applied. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html