Merge tag 'powerpc-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux-2.6-block.git] / drivers / of / base.c
index 335d102586ac2dc7d935b3a91022a56151e4494f..8856c67c466acd4dc98aee218f3ceaebf250a7a9 100644 (file)
@@ -395,25 +395,26 @@ int of_device_compatible_match(const struct device_node *device,
 EXPORT_SYMBOL_GPL(of_device_compatible_match);
 
 /**
- * of_machine_is_compatible - Test root of device tree for a given compatible value
- * @compat: compatible string to look for in root node's compatible property.
+ * of_machine_compatible_match - Test root of device tree against a compatible array
+ * @compats: NULL terminated array of compatible strings to look for in root node's compatible property.
  *
- * Return: A positive integer if the root node has the given value in its
+ * Returns true if the root node has any of the given compatible values in its
  * compatible property.
  */
-int of_machine_is_compatible(const char *compat)
+bool of_machine_compatible_match(const char *const *compats)
 {
        struct device_node *root;
        int rc = 0;
 
        root = of_find_node_by_path("/");
        if (root) {
-               rc = of_device_is_compatible(root, compat);
+               rc = of_device_compatible_match(root, compats);
                of_node_put(root);
        }
-       return rc;
+
+       return rc != 0;
 }
-EXPORT_SYMBOL(of_machine_is_compatible);
+EXPORT_SYMBOL(of_machine_compatible_match);
 
 static bool __of_device_is_status(const struct device_node *device,
                                  const char * const*strings)