diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-14 18:32:00 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-20 03:01:20 -0400 |
commit | 411e689d929d5fc2e9066e30de55e8bcdbd573ad (patch) | |
tree | df32fe6ab367b3384042b80d2043fb92d2c56a4b | |
parent | 5ca123760177ed16cbd9bab609bff69eb8fc45bd (diff) |
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>
-rw-r--r-- | arch/powerpc/sysdev/mmio_nvram.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/mmio_nvram.c b/arch/powerpc/sysdev/mmio_nvram.c index 207324209065..ddc877a3a23a 100644 --- a/arch/powerpc/sysdev/mmio_nvram.c +++ b/arch/powerpc/sysdev/mmio_nvram.c | |||
@@ -115,6 +115,8 @@ int __init mmio_nvram_init(void) | |||
115 | int ret; | 115 | int ret; |
116 | 116 | ||
117 | nvram_node = of_find_node_by_type(NULL, "nvram"); | 117 | nvram_node = of_find_node_by_type(NULL, "nvram"); |
118 | if (!nvram_node) | ||
119 | nvram_node = of_find_compatible_node(NULL, NULL, "nvram"); | ||
118 | if (!nvram_node) { | 120 | if (!nvram_node) { |
119 | printk(KERN_WARNING "nvram: no node found in device-tree\n"); | 121 | printk(KERN_WARNING "nvram: no node found in device-tree\n"); |
120 | return -ENODEV; | 122 | return -ENODEV; |