mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
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>
This commit is contained in:
parent
5ca1237601
commit
411e689d92
1 changed files with 2 additions and 0 deletions
|
|
@ -115,6 +115,8 @@ int __init mmio_nvram_init(void)
|
|||
int ret;
|
||||
|
||||
nvram_node = of_find_node_by_type(NULL, "nvram");
|
||||
if (!nvram_node)
|
||||
nvram_node = of_find_compatible_node(NULL, NULL, "nvram");
|
||||
if (!nvram_node) {
|
||||
printk(KERN_WARNING "nvram: no node found in device-tree\n");
|
||||
return -ENODEV;
|
||||
|
|
|
|||
Loading…
Reference in a new issue