From: Jingoo Han Date: Fri, 30 Aug 2013 04:55:46 +0000 (+0900) Subject: net: ethoc: use dev_get_platdata() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=420fcd82206ff5e03690247b10a08e585446a517;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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 {