*参照元 [#xf3808e8]
#backlinks
*説明 [#jbd17907]
-パス: 複数あり
--CONFIG_OF 有効: [[linux-4.4.1/drivers/of/base.c]]
--CONFIG_OF 無効: [[linux-4.4.1/include/linux/of.h]]
--[[linux-4.4.1/CONFIG_OF]]
-FIXME: これは何?
--説明
**引数 [#h7ff2644]
-phandle handle
--
--[[linux-4.4.1/phandle]]
**返り値 [#a7732bda]
-struct device_node *
--
--[[linux-4.4.1/device_node]]
**参考 [#z56a8b7d]
*実装 [#oc6aa909]
**CONFIG_OF 有効: drivers/of/base.c [#r55c0b83]
/**
* 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;
-
--[[linux-4.4.1/raw_spin_lock_irqsave()]]
--[[linux-4.4.1/devtree_lock(global)]]
--[[linux-4.4.1/for_each_of_allnodes()]]
of_node_get(np);
raw_spin_unlock_irqrestore(&devtree_lock, flags);
return np;
-
--[[linux-4.4.1/of_node_get()]]
--[[linux-4.4.1/raw_spin_unlock_irqrestore()]]
}
EXPORT_SYMBOL(of_find_node_by_phandle);
-
--[[linux-4.4.1/EXPORT_SYMBOL()]]
**CONFIG_OF 無効: include/linux/of.h [#ib972968]
static inline struct device_node *of_find_node_by_phandle(phandle handle)
{
return NULL;
}
*コメント [#cfadbc5b]