xen/device-tree: Make dt_find_node_by_phandle global
authorOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Fri, 8 Oct 2021 05:55:28 +0000 (08:55 +0300)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Fri, 8 Oct 2021 22:45:44 +0000 (15:45 -0700)
Make dt_find_node_by_phandle globally visible, so it can be re-used by
other frameworks.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>
xen/common/device_tree.c
xen/include/xen/device_tree.h

index ea93da1725f6fec501edd1442937a0a5559ac021..4aae281e89bf1fae8d27a08f8cdb465a0b0d1fa6 100644 (file)
@@ -1047,7 +1047,7 @@ int dt_for_each_range(const struct dt_device_node *dev,
  *
  * Returns a node pointer.
  */
-static struct dt_device_node *dt_find_node_by_phandle(dt_phandle handle)
+struct dt_device_node *dt_find_node_by_phandle(dt_phandle handle)
 {
     struct dt_device_node *np;
 
index 2297c59ce66d22c01e2372a08820334c0acd64ab..fd6cd00b433a12622e07fa12a48890fd3bdc9479 100644 (file)
@@ -849,6 +849,8 @@ int dt_count_phandle_with_args(const struct dt_device_node *np,
  */
 int dt_get_pci_domain_nr(struct dt_device_node *node);
 
+struct dt_device_node *dt_find_node_by_phandle(dt_phandle handle);
+
 #ifdef CONFIG_DEVICE_TREE_DEBUG
 #define dt_dprintk(fmt, args...)  \
     printk(XENLOG_DEBUG fmt, ## args)