]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/of: Fix sparc build failure caused by of_alias_scan
authorGrant Likely <grant.likely@secretlab.ca>
Thu, 4 Aug 2011 06:26:10 +0000 (07:26 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 4 Aug 2011 06:26:10 +0000 (07:26 +0100)
Commit 750f463a, "dt: add of_alias_scan and of_alias_get_id" breaks
platforms that don't use CONFIG_OF_FLATTREE, like SPARC and OLPC.  Fix
it by only building it on platforms using the flat tree.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/of/base.c

index fb28b5af733b2e7ac8ce54f4aaabff38928d7e59..c81a0fe369a1dba9a7f79bb157b46fa87b94e947 100644 (file)
@@ -1013,6 +1013,7 @@ out_unlock:
 }
 #endif /* defined(CONFIG_OF_DYNAMIC) */
 
+#ifdef CONFIG_OF_FLATTREE
 static void of_alias_add(struct alias_prop *ap, struct device_node *np,
                         int id, const char *stem, int stem_len)
 {
@@ -1118,3 +1119,4 @@ int of_alias_get_id(struct device_node *np, const char *stem)
        return id;
 }
 EXPORT_SYMBOL_GPL(of_alias_get_id);
+#endif /* CONFIG_OF_FLATTREE */