net: 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. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are. Cc: "David S. Miller" <davem@davemloft.net> Cc: Claudiu Manoil <claudiu.manoil@nxp.com> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Wingman Kwok <w-kwok2@ti.com> Cc: Murali Karicheri <m-karicheri2@ti.com> Cc: netdev@vger.kernel.org Cc: linux-omap@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d66280b12b
commit
bf5849f15a
@@ -3271,7 +3271,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
|
||||
const __be32 *parp;
|
||||
|
||||
/* This is no slave child node, continue */
|
||||
if (strcmp(slave_node->name, "slave"))
|
||||
if (!of_node_name_eq(slave_node, "slave"))
|
||||
continue;
|
||||
|
||||
slave_data->phy_node = of_parse_phandle(slave_node,
|
||||
@@ -3367,7 +3367,7 @@ static void cpsw_remove_dt(struct platform_device *pdev)
|
||||
for_each_available_child_of_node(node, slave_node) {
|
||||
struct cpsw_slave_data *slave_data = &data->slave_data[i];
|
||||
|
||||
if (strcmp(slave_node->name, "slave"))
|
||||
if (!of_node_name_eq(slave_node, "slave"))
|
||||
continue;
|
||||
|
||||
if (of_phy_is_fixed_link(slave_node))
|
||||
|
Reference in New Issue
Block a user