mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 01/11] of: make of_alias_get work on all types of DT paths
@ 2015-03-03 19:46 Lucas Stach
  2015-03-03 19:46 ` [PATCH 02/11] ARM: tegra20: add mmc aliases Lucas Stach
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Lucas Stach @ 2015-03-03 19:46 UTC (permalink / raw)
  To: barebox

of_alias_get assumed that a DT path is always the full node path,
whic is not necessarily the case, as there are other valid path
descriptions. All of them are handled by of_find_node_by_path.

As there is already a preparsed list with all DT aliases that handles
this case properly we can simply reuse that one.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 drivers/of/base.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index af10fd1..b77d879 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -227,11 +227,11 @@ EXPORT_SYMBOL_GPL(of_alias_get_id);
 
 const char *of_alias_get(struct device_node *np)
 {
-	struct property *pp;
+	struct alias_prop *app;
 
-	list_for_each_entry(pp, &of_aliases->properties, list) {
-		if (!of_node_cmp(np->full_name, pp->value))
-			return pp->name;
+	list_for_each_entry(app, &aliases_lookup, link) {
+		if (np == app->np)
+			return app->alias;
 	}
 
 	return NULL;
-- 
2.1.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-03-04 10:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 19:46 [PATCH 01/11] of: make of_alias_get work on all types of DT paths Lucas Stach
2015-03-03 19:46 ` [PATCH 02/11] ARM: tegra20: add mmc aliases Lucas Stach
2015-03-03 19:46 ` [PATCH 03/11] ARM: tegra30: " Lucas Stach
2015-03-03 19:46 ` [PATCH 04/11] ARM: tegra124: " Lucas Stach
2015-03-03 19:46 ` [PATCH 05/11] mci: tegra: handle " Lucas Stach
2015-03-03 19:46 ` [PATCH 06/11] bbu: include necessary headers Lucas Stach
2015-03-03 19:46 ` [PATCH 07/11] bbu: make bbu confirm a bit more verbose Lucas Stach
2015-03-03 19:46 ` [PATCH 08/11] ARM: tegra: add eMMC barebox update handler Lucas Stach
2015-03-03 19:46 ` [PATCH 09/11] ARM: tegra: add barebox update handler to Beaver board Lucas Stach
2015-03-03 19:46 ` [PATCH 10/11] ARM: tegra: add barebox update handler to Jetson board Lucas Stach
2015-03-03 19:46 ` [PATCH 11/11] ARM: tegra: enable barebox update in defconfig Lucas Stach
2015-03-04 10:34 ` [PATCH 01/11] of: make of_alias_get work on all types of DT paths Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox