Commit 9d7e72c0 authored by Iyappan Subramanian's avatar Iyappan Subramanian Committed by David S. Miller

drivers: net: xgene: Read tx/rx delay for ACPI

This patch fixes reading tx/rx delay values for ACPI.
Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
Signed-off-by: default avatarQuan Nguyen <qnguyen@apm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b1357cfb
...@@ -1591,7 +1591,7 @@ static int xgene_get_tx_delay(struct xgene_enet_pdata *pdata) ...@@ -1591,7 +1591,7 @@ static int xgene_get_tx_delay(struct xgene_enet_pdata *pdata)
struct device *dev = &pdata->pdev->dev; struct device *dev = &pdata->pdev->dev;
int delay, ret; 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) { if (ret) {
pdata->tx_delay = 4; pdata->tx_delay = 4;
return 0; return 0;
...@@ -1612,7 +1612,7 @@ static int xgene_get_rx_delay(struct xgene_enet_pdata *pdata) ...@@ -1612,7 +1612,7 @@ static int xgene_get_rx_delay(struct xgene_enet_pdata *pdata)
struct device *dev = &pdata->pdev->dev; struct device *dev = &pdata->pdev->dev;
int delay, ret; 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) { if (ret) {
pdata->rx_delay = 2; pdata->rx_delay = 2;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment