diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-08-30 00:56:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-30 17:43:36 -0400 |
commit | 94660ba09079dd8a4527cb26b6c76724394f0460 (patch) | |
tree | e4bf4ae97a87bae725b76eb472d8b417f900e679 /drivers/net/ethernet/freescale | |
parent | 420fcd82206ff5e03690247b10a08e585446a517 (diff) |
net: fec: 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: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index c88a1290602a..46019ba6e23a 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c | |||
@@ -1059,7 +1059,7 @@ static int fec_enet_rx_napi(struct napi_struct *napi, int budget) | |||
1059 | static void fec_get_mac(struct net_device *ndev) | 1059 | static void fec_get_mac(struct net_device *ndev) |
1060 | { | 1060 | { |
1061 | struct fec_enet_private *fep = netdev_priv(ndev); | 1061 | struct fec_enet_private *fep = netdev_priv(ndev); |
1062 | struct fec_platform_data *pdata = fep->pdev->dev.platform_data; | 1062 | struct fec_platform_data *pdata = dev_get_platdata(&fep->pdev->dev); |
1063 | unsigned char *iap, tmpaddr[ETH_ALEN]; | 1063 | unsigned char *iap, tmpaddr[ETH_ALEN]; |
1064 | 1064 | ||
1065 | /* | 1065 | /* |
@@ -2088,7 +2088,7 @@ fec_probe(struct platform_device *pdev) | |||
2088 | 2088 | ||
2089 | ret = of_get_phy_mode(pdev->dev.of_node); | 2089 | ret = of_get_phy_mode(pdev->dev.of_node); |
2090 | if (ret < 0) { | 2090 | if (ret < 0) { |
2091 | pdata = pdev->dev.platform_data; | 2091 | pdata = dev_get_platdata(&pdev->dev); |
2092 | if (pdata) | 2092 | if (pdata) |
2093 | fep->phy_interface = pdata->phy; | 2093 | fep->phy_interface = pdata->phy; |
2094 | else | 2094 | else |