diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-07-08 01:35:59 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-07-20 07:29:56 +0300 |
commit | b9c13fe32faaa71c4e4f8a426d79f8c93495e9f9 (patch) | |
tree | fd5e37fb5b98fb52b13411c3f25c930bb01ce89e /include/linux/of.h | |
parent | e2413a7dae52fab290b7a8d11ec8579657bab95b (diff) | |
download | linux-b9c13fe32faaa71c4e4f8a426d79f8c93495e9f9.tar.xz |
dt: Add of_device_compatible_match()
This provides an equivalent of of_fdt_match() for non-flat trees.
This is more practical than matching an array of of_device_id structs
when converting a bunch of existing users of of_fdt_match().
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 74eb28cadbef..33c184d3dcd8 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -324,6 +324,8 @@ extern int of_property_read_string_helper(const struct device_node *np, const char **out_strs, size_t sz, int index); extern int of_device_is_compatible(const struct device_node *device, const char *); +extern int of_device_compatible_match(struct device_node *device, + const char *const *compat); extern bool of_device_is_available(const struct device_node *device); extern bool of_device_is_big_endian(const struct device_node *device); extern const void *of_get_property(const struct device_node *node, |