aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cadence/macb.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-08-30 01:12:21 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-30 17:43:39 -0400
commitc607a0d99cef3e14a2fe99771348a49e6cb4fa55 (patch)
tree2a4312016fe035fad9d37987c67a3d37fcc5c0af /drivers/net/ethernet/cadence/macb.c
parent09a274805676239d52198503ad552537c1148aad (diff)
net: macb: 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> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence/macb.c')
-rw-r--r--drivers/net/ethernet/cadence/macb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 7660c45a2eb9..92578690f6de 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -125,7 +125,7 @@ void macb_get_hwaddr(struct macb *bp)
125 u8 addr[6]; 125 u8 addr[6];
126 int i; 126 int i;
127 127
128 pdata = bp->pdev->dev.platform_data; 128 pdata = dev_get_platdata(&bp->pdev->dev);
129 129
130 /* Check all 4 address register for vaild address */ 130 /* Check all 4 address register for vaild address */
131 for (i = 0; i < 4; i++) { 131 for (i = 0; i < 4; i++) {
@@ -335,7 +335,7 @@ int macb_mii_init(struct macb *bp)
335 bp->pdev->name, bp->pdev->id); 335 bp->pdev->name, bp->pdev->id);
336 bp->mii_bus->priv = bp; 336 bp->mii_bus->priv = bp;
337 bp->mii_bus->parent = &bp->dev->dev; 337 bp->mii_bus->parent = &bp->dev->dev;
338 pdata = bp->pdev->dev.platform_data; 338 pdata = dev_get_platdata(&bp->pdev->dev);
339 339
340 bp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); 340 bp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
341 if (!bp->mii_bus->irq) { 341 if (!bp->mii_bus->irq) {
@@ -1851,7 +1851,7 @@ static int __init macb_probe(struct platform_device *pdev)
1851 1851
1852 err = of_get_phy_mode(pdev->dev.of_node); 1852 err = of_get_phy_mode(pdev->dev.of_node);
1853 if (err < 0) { 1853 if (err < 0) {
1854 pdata = pdev->dev.platform_data; 1854 pdata = dev_get_platdata(&pdev->dev);
1855 if (pdata && pdata->is_rmii) 1855 if (pdata && pdata->is_rmii)
1856 bp->phy_interface = PHY_INTERFACE_MODE_RMII; 1856 bp->phy_interface = PHY_INTERFACE_MODE_RMII;
1857 else 1857 else