summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-08-30 13:55:46 +0900
committerDavid S. Miller <davem@davemloft.net>2013-08-30 17:43:35 -0400
commit420fcd82206ff5e03690247b10a08e585446a517 (patch)
treef105563eb6df224ec51e1129d1014d36810344a9 /drivers/net
parentcd4e2e4b368fd52e29817fe9447c2204b76467f9 (diff)
net: ethoc: 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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/ethoc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c
index cf579fb39bc5..4de8cfd149cf 100644
--- a/drivers/net/ethernet/ethoc.c
+++ b/drivers/net/ethernet/ethoc.c
@@ -1030,8 +1030,8 @@ static int ethoc_probe(struct platform_device *pdev)
}
/* Allow the platform setup code to pass in a MAC address. */
- if (pdev->dev.platform_data) {
- struct ethoc_platform_data *pdata = pdev->dev.platform_data;
+ if (dev_get_platdata(&pdev->dev)) {
+ struct ethoc_platform_data *pdata = dev_get_platdata(&pdev->dev);
memcpy(netdev->dev_addr, pdata->hwaddr, IFHWADDRLEN);
priv->phy_id = pdata->phy_id;
} else {