aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIyappan Subramanian <isubramanian@apm.com>2017-09-05 14:16:30 -0400
committerDavid S. Miller <davem@davemloft.net>2017-09-05 17:58:25 -0400
commit9d7e72c088e3b18b5f6d028ad499d38a210d1928 (patch)
tree629c5ebc8509a1a11d2de28e315e2533202fe264
parentb1357cfb9dd1a511269b62d2c1c986865815335a (diff)
drivers: net: xgene: Read tx/rx delay for ACPI
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>
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index 6e253d913fe2..655c0fc34d8a 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -1591,7 +1591,7 @@ static int xgene_get_tx_delay(struct xgene_enet_pdata *pdata)
1591 struct device *dev = &pdata->pdev->dev; 1591 struct device *dev = &pdata->pdev->dev;
1592 int delay, ret; 1592 int delay, ret;
1593 1593
1594 ret = of_property_read_u32(dev->of_node, "tx-delay", &delay); 1594 ret = device_property_read_u32(dev, "tx-delay", &delay);
1595 if (ret) { 1595 if (ret) {
1596 pdata->tx_delay = 4; 1596 pdata->tx_delay = 4;
1597 return 0; 1597 return 0;
@@ -1612,7 +1612,7 @@ static int xgene_get_rx_delay(struct xgene_enet_pdata *pdata)
1612 struct device *dev = &pdata->pdev->dev; 1612 struct device *dev = &pdata->pdev->dev;
1613 int delay, ret; 1613 int delay, ret;
1614 1614
1615 ret = of_property_read_u32(dev->of_node, "rx-delay", &delay); 1615 ret = device_property_read_u32(dev, "rx-delay", &delay);
1616 if (ret) { 1616 if (ret) {
1617 pdata->rx_delay = 2; 1617 pdata->rx_delay = 2;
1618 return 0; 1618 return 0;