drivers: net: xgene: Read tx/rx delay for ACPI
authorIyappan Subramanian <isubramanian@apm.com>
Tue, 5 Sep 2017 18:16:30 +0000 (11:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Sep 2017 21:58:25 +0000 (14:58 -0700)
This patch fixes reading tx/rx delay values for ACPI.

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Quan Nguyen <qnguyen@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/apm/xgene/xgene_enet_main.c

index 6e253d913fe29df271ebae8726bbd5062d41ccb3..655c0fc34d8a01bccf02ac9425e6bdc4099f72a5 100644 (file)
@@ -1591,7 +1591,7 @@ static int xgene_get_tx_delay(struct xgene_enet_pdata *pdata)
        struct device *dev = &pdata->pdev->dev;
        int delay, ret;
 
-       ret = of_property_read_u32(dev->of_node, "tx-delay", &delay);
+       ret = device_property_read_u32(dev, "tx-delay", &delay);
        if (ret) {
                pdata->tx_delay = 4;
                return 0;
@@ -1612,7 +1612,7 @@ static int xgene_get_rx_delay(struct xgene_enet_pdata *pdata)
        struct device *dev = &pdata->pdev->dev;
        int delay, ret;
 
-       ret = of_property_read_u32(dev->of_node, "rx-delay", &delay);
+       ret = device_property_read_u32(dev, "rx-delay", &delay);
        if (ret) {
                pdata->rx_delay = 2;
                return 0;