Skip to content

Commit f91b29f

Browse files
Jingoo Handavem330
authored andcommitted
net: stmmac: 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>
1 parent c607a0d commit f91b29f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static int stmmac_pltfr_probe(struct platform_device *pdev)
118118
if (IS_ERR(addr))
119119
return PTR_ERR(addr);
120120

121-
plat_dat = pdev->dev.platform_data;
121+
plat_dat = dev_get_platdata(&pdev->dev);
122122
if (pdev->dev.of_node) {
123123
if (!plat_dat)
124124
plat_dat = devm_kzalloc(&pdev->dev,

0 commit comments

Comments
 (0)