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>
This commit is contained in:
parent
420fcd8220
commit
94660ba090
1 changed files with 2 additions and 2 deletions
|
@ -1059,7 +1059,7 @@ static int fec_enet_rx_napi(struct napi_struct *napi, int budget)
|
||||||
static void fec_get_mac(struct net_device *ndev)
|
static void fec_get_mac(struct net_device *ndev)
|
||||||
{
|
{
|
||||||
struct fec_enet_private *fep = netdev_priv(ndev);
|
struct fec_enet_private *fep = netdev_priv(ndev);
|
||||||
struct fec_platform_data *pdata = fep->pdev->dev.platform_data;
|
struct fec_platform_data *pdata = dev_get_platdata(&fep->pdev->dev);
|
||||||
unsigned char *iap, tmpaddr[ETH_ALEN];
|
unsigned char *iap, tmpaddr[ETH_ALEN];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2088,7 +2088,7 @@ fec_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
ret = of_get_phy_mode(pdev->dev.of_node);
|
ret = of_get_phy_mode(pdev->dev.of_node);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
pdata = pdev->dev.platform_data;
|
pdata = dev_get_platdata(&pdev->dev);
|
||||||
if (pdata)
|
if (pdata)
|
||||||
fep->phy_interface = pdata->phy;
|
fep->phy_interface = pdata->phy;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue