参照元†
返り値†
CONFIG_OF 有効: drivers/of/base.c†
/**
* of_find_node_by_phandle - Find a node given a phandle
* @handle: phandle of the node to find
*
* Returns a node pointer with refcount incremented, use
* of_node_put() on it when done.
*/
struct device_node *of_find_node_by_phandle(phandle handle)
{
struct device_node *np;
unsigned long flags;
if (!handle)
return NULL;
raw_spin_lock_irqsave(&devtree_lock, flags);
for_each_of_allnodes(np)
if (np->phandle == handle)
break;
of_node_get(np);
raw_spin_unlock_irqrestore(&devtree_lock, flags);
return np;
}
EXPORT_SYMBOL(of_find_node_by_phandle);
CONFIG_OF 無効: include/linux/of.h†
static inline struct device_node *of_find_node_by_phandle(phandle handle)
{
return NULL;
}
コメント†