]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: fsl: Use device_type helpers to access the node type
authorRob Herring <robh@kernel.org>
Fri, 16 Nov 2018 22:11:03 +0000 (16:11 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Nov 2018 05:52:58 +0000 (21:52 -0800)
Remove directly accessing device_node.type pointer and use the accessors
instead. This will eventually allow removing the type pointer.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fsl_pq_mdio.c

index 82722d05fedb1be4a973e6771e015d295c3f5867..88a396fd242fdd65b5a53f079e6db2c03a25cf12 100644 (file)
@@ -473,7 +473,7 @@ static int fsl_pq_mdio_probe(struct platform_device *pdev)
 
        if (data->get_tbipa) {
                for_each_child_of_node(np, tbi) {
-                       if (strcmp(tbi->type, "tbi-phy") == 0) {
+                       if (of_node_is_type(tbi, "tbi-phy")) {
                                dev_dbg(&pdev->dev, "found TBI PHY node %pOFP\n",
                                        tbi);
                                break;