diff options
Diffstat (limited to 'arch/powerpc/boot/libfdt-wrapper.c')
-rw-r--r-- | arch/powerpc/boot/libfdt-wrapper.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/boot/libfdt-wrapper.c b/arch/powerpc/boot/libfdt-wrapper.c index 97af36c224bd..59016bef1391 100644 --- a/arch/powerpc/boot/libfdt-wrapper.c +++ b/arch/powerpc/boot/libfdt-wrapper.c | |||
@@ -133,6 +133,14 @@ static void *fdt_wrapper_find_node_by_prop_value(const void *prev, | |||
133 | return offset_devp(offset); | 133 | return offset_devp(offset); |
134 | } | 134 | } |
135 | 135 | ||
136 | static void *fdt_wrapper_find_node_by_compatible(const void *prev, | ||
137 | const char *val) | ||
138 | { | ||
139 | int offset = fdt_node_offset_by_compatible(fdt, devp_offset_find(prev), | ||
140 | val); | ||
141 | return offset_devp(offset); | ||
142 | } | ||
143 | |||
136 | static char *fdt_wrapper_get_path(const void *devp, char *buf, int len) | 144 | static char *fdt_wrapper_get_path(const void *devp, char *buf, int len) |
137 | { | 145 | { |
138 | int rc; | 146 | int rc; |
@@ -164,6 +172,7 @@ void fdt_init(void *blob) | |||
164 | dt_ops.get_parent = fdt_wrapper_get_parent; | 172 | dt_ops.get_parent = fdt_wrapper_get_parent; |
165 | dt_ops.create_node = fdt_wrapper_create_node; | 173 | dt_ops.create_node = fdt_wrapper_create_node; |
166 | dt_ops.find_node_by_prop_value = fdt_wrapper_find_node_by_prop_value; | 174 | dt_ops.find_node_by_prop_value = fdt_wrapper_find_node_by_prop_value; |
175 | dt_ops.find_node_by_compatible = fdt_wrapper_find_node_by_compatible; | ||
167 | dt_ops.get_path = fdt_wrapper_get_path; | 176 | dt_ops.get_path = fdt_wrapper_get_path; |
168 | dt_ops.finalize = fdt_wrapper_finalize; | 177 | dt_ops.finalize = fdt_wrapper_finalize; |
169 | 178 | ||