Commit bbfa6d0a authored by Jingoo Han's avatar Jingoo Han Committed by David S. Miller

net: mv643xx_eth: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 94660ba0
...@@ -2641,7 +2641,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev) ...@@ -2641,7 +2641,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
ret = mv643xx_eth_shared_of_probe(pdev); ret = mv643xx_eth_shared_of_probe(pdev);
if (ret) if (ret)
return ret; return ret;
pd = pdev->dev.platform_data; pd = dev_get_platdata(&pdev->dev);
msp->tx_csum_limit = (pd != NULL && pd->tx_csum_limit) ? msp->tx_csum_limit = (pd != NULL && pd->tx_csum_limit) ?
pd->tx_csum_limit : 9 * 1024; pd->tx_csum_limit : 9 * 1024;
...@@ -2833,7 +2833,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev) ...@@ -2833,7 +2833,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
struct resource *res; struct resource *res;
int err; int err;
pd = pdev->dev.platform_data; pd = dev_get_platdata(&pdev->dev);
if (pd == NULL) { if (pd == NULL) {
dev_err(&pdev->dev, "no mv643xx_eth_platform_data\n"); dev_err(&pdev->dev, "no mv643xx_eth_platform_data\n");
return -ENODEV; return -ENODEV;
......
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