]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: stmmac: use dev_get_platdata()
authorJingoo Han <jg1.han@samsung.com>
Fri, 30 Aug 2013 05:13:46 +0000 (14:13 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Aug 2013 21:43:39 +0000 (17:43 -0400)
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>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

index 74a89a4aef886beed1754adfb0b86d9014b8d6f4..623ebc50fe6b2bb0122cbec89d0cefead9e4aa12 100644 (file)
@@ -118,7 +118,7 @@ static int stmmac_pltfr_probe(struct platform_device *pdev)
        if (IS_ERR(addr))
                return PTR_ERR(addr);
 
-       plat_dat = pdev->dev.platform_data;
+       plat_dat = dev_get_platdata(&pdev->dev);
        if (pdev->dev.of_node) {
                if (!plat_dat)
                        plat_dat = devm_kzalloc(&pdev->dev,