Skip to content

Commit f6707fd

Browse files
committed
of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC
Cache nodes under the cpu node(s) is PowerMac specific according to the comment above, so make the code enforce that. Signed-off-by: Rob Herring <robh@kernel.org>
1 parent 6d0a70a commit f6707fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/of/base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,7 @@ struct device_node *of_find_next_cache_node(const struct device_node *np)
20102010
/* OF on pmac has nodes instead of properties named "l2-cache"
20112011
* beneath CPU nodes.
20122012
*/
2013-
if (!strcmp(np->type, "cpu"))
2013+
if (IS_ENABLED(CONFIG_PPC_PMAC) && !strcmp(np->type, "cpu"))
20142014
for_each_child_of_node(np, child)
20152015
if (!strcmp(child->type, "cache"))
20162016
return child;

0 commit comments

Comments
 (0)