aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-08-30 00:50:48 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-30 17:43:35 -0400
commita63b82c44b18860e63016ae24e2bc4d97cefc806 (patch)
tree6f9d6959f444d2a94da99e95bbb8f917654dcfad
parenta3ea280004c5d873a75c860f7d9b0e2a4d45c5f4 (diff)
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: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/adi/bfin_mac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
index e904b3838dcc..e66684a438f5 100644
--- a/drivers/net/ethernet/adi/bfin_mac.c
+++ b/drivers/net/ethernet/adi/bfin_mac.c
@@ -1647,12 +1647,12 @@ static int bfin_mac_probe(struct platform_device *pdev)
1647 1647
1648 setup_mac_addr(ndev->dev_addr); 1648 setup_mac_addr(ndev->dev_addr);
1649 1649
1650 if (!pdev->dev.platform_data) { 1650 if (!dev_get_platdata(&pdev->dev)) {
1651 dev_err(&pdev->dev, "Cannot get platform device bfin_mii_bus!\n"); 1651 dev_err(&pdev->dev, "Cannot get platform device bfin_mii_bus!\n");
1652 rc = -ENODEV; 1652 rc = -ENODEV;
1653 goto out_err_probe_mac; 1653 goto out_err_probe_mac;
1654 } 1654 }
1655 pd = pdev->dev.platform_data; 1655 pd = dev_get_platdata(&pdev->dev);
1656 lp->mii_bus = platform_get_drvdata(pd); 1656 lp->mii_bus = platform_get_drvdata(pd);
1657 if (!lp->mii_bus) { 1657 if (!lp->mii_bus) {
1658 dev_err(&pdev->dev, "Cannot get mii_bus!\n"); 1658 dev_err(&pdev->dev, "Cannot get mii_bus!\n");
@@ -1660,7 +1660,7 @@ static int bfin_mac_probe(struct platform_device *pdev)
1660 goto out_err_probe_mac; 1660 goto out_err_probe_mac;
1661 } 1661 }
1662 lp->mii_bus->priv = ndev; 1662 lp->mii_bus->priv = ndev;
1663 mii_bus_data = pd->dev.platform_data; 1663 mii_bus_data = dev_get_platdata(&pd->dev);
1664 1664
1665 rc = mii_probe(ndev, mii_bus_data->phy_mode); 1665 rc = mii_probe(ndev, mii_bus_data->phy_mode);
1666 if (rc) { 1666 if (rc) {