Skip to content

Commit 411e689

Browse files
committed
powerpc/nvram: Search for nvram using compatible
As well as searching for nodes with type = "nvram", search for nodes that have compatible = "nvram". This can't be converted into a single call to of_find_compatible_node() with a non-NULL type, because that searches for a node that has _both_ type & compatible = "nvram". Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1 parent 5ca1237 commit 411e689

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎arch/powerpc/sysdev/mmio_nvram.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ int __init mmio_nvram_init(void)
115115
int ret;
116116

117117
nvram_node = of_find_node_by_type(NULL, "nvram");
118+
if (!nvram_node)
119+
nvram_node = of_find_compatible_node(NULL, NULL, "nvram");
118120
if (!nvram_node) {
119121
printk(KERN_WARNING "nvram: no node found in device-tree\n");
120122
return -ENODEV;

0 commit comments

Comments
 (0)