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

net: bfin_mac: 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 a3ea2800
...@@ -1647,12 +1647,12 @@ static int bfin_mac_probe(struct platform_device *pdev) ...@@ -1647,12 +1647,12 @@ static int bfin_mac_probe(struct platform_device *pdev)
setup_mac_addr(ndev->dev_addr); setup_mac_addr(ndev->dev_addr);
if (!pdev->dev.platform_data) { if (!dev_get_platdata(&pdev->dev)) {
dev_err(&pdev->dev, "Cannot get platform device bfin_mii_bus!\n"); dev_err(&pdev->dev, "Cannot get platform device bfin_mii_bus!\n");
rc = -ENODEV; rc = -ENODEV;
goto out_err_probe_mac; goto out_err_probe_mac;
} }
pd = pdev->dev.platform_data; pd = dev_get_platdata(&pdev->dev);
lp->mii_bus = platform_get_drvdata(pd); lp->mii_bus = platform_get_drvdata(pd);
if (!lp->mii_bus) { if (!lp->mii_bus) {
dev_err(&pdev->dev, "Cannot get mii_bus!\n"); dev_err(&pdev->dev, "Cannot get mii_bus!\n");
...@@ -1660,7 +1660,7 @@ static int bfin_mac_probe(struct platform_device *pdev) ...@@ -1660,7 +1660,7 @@ static int bfin_mac_probe(struct platform_device *pdev)
goto out_err_probe_mac; goto out_err_probe_mac;
} }
lp->mii_bus->priv = ndev; lp->mii_bus->priv = ndev;
mii_bus_data = pd->dev.platform_data; mii_bus_data = dev_get_platdata(&pd->dev);
rc = mii_probe(ndev, mii_bus_data->phy_mode); rc = mii_probe(ndev, mii_bus_data->phy_mode);
if (rc) { if (rc) {
......
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