提交 adc9fbcd 编写于 作者: R Rob Herring 提交者: Bjorn Helgaas

PCI: Use of_node_name_eq() for node name comparisons

Convert string compares of DT node names to use of_node_name_eq() helper
instead. This removes direct access to the node name pointer.

Link: https://lore.kernel.org/r/20200416215114.7715-1-robh@kernel.orgSigned-off-by: NRob Herring <robh@kernel.org>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
上级 a6cec3fd
......@@ -435,7 +435,7 @@ static int rpaphp_drc_add_slot(struct device_node *dn)
*/
int rpaphp_add_slot(struct device_node *dn)
{
if (!dn->name || strcmp(dn->name, "pci"))
if (!of_node_name_eq(dn, "pci"))
return 0;
if (of_find_property(dn, "ibm,drc-info", NULL))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册