[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqLNWRWxfD0qLsQ9crRa3_-TtykwUjuQvJQZC2E_xLhywg@mail.gmail.com>
Date: Wed, 4 Dec 2013 13:23:52 -0600
From: Rob Herring <robherring2@...il.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Cc: "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Russell King <linux@....linux.org.uk>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Meelis Roos <mroos@...ux.ee>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Rob Herring <rob.herring@...xeda.com>,
Scott Wood <scottwood@...escale.com>,
Thierry Reding <thierry.reding@...il.com>,
Marc Kleine-Budde <mkl@...gutronix.de>,
Grant Likely <grant.likely@...aro.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2] OF: base: match each node compatible against all given
matches first
On Tue, Dec 3, 2013 at 7:52 AM, Sebastian Hesselbarth
<sebastian.hesselbarth@...il.com> 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@...il.com>
> ---
> Changelog:
> v1->v2:
> - Allow checks against nodes with no compatible (Reported by Rob Herring)
> - Add some comments
>
> Cc: Grant Likely <grant.likely@...aro.org>
> Cc: Rob Herring <rob.herring@...xeda.com>
> Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> Cc: Russell King <linux@....linux.org.uk>
> Cc: Thierry Reding <thierry.reding@...il.com>
> Cc: Meelis Roos <mroos@...ux.ee>
> Cc: Marc Kleine-Budde <mkl@...gutronix.de>
> Cc: Scott Wood <scottwood@...escale.com>
> Cc: devicetree@...r.kernel.org
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org
> ---
> drivers/of/base.c | 53 +++++++++++++++++++++++++++++++++++++----------------
> 1 files changed, 37 insertions(+), 16 deletions(-)
Applied.
Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists