Commit ca162a82 authored by Fabio Estevam's avatar Fabio Estevam Committed by David S. Miller

fec: Only pass pdev in fec_ptp_init()

Passing pdev in fec_ptp_init() is enough, since we can get ndev locally.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 28850dc7
...@@ -275,7 +275,7 @@ struct fec_enet_private { ...@@ -275,7 +275,7 @@ struct fec_enet_private {
struct regulator *reg_phy; struct regulator *reg_phy;
}; };
void fec_ptp_init(struct net_device *ndev, struct platform_device *pdev); void fec_ptp_init(struct platform_device *pdev);
void fec_ptp_start_cyclecounter(struct net_device *ndev); void fec_ptp_start_cyclecounter(struct net_device *ndev);
int fec_ptp_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd); int fec_ptp_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd);
......
...@@ -1945,7 +1945,7 @@ fec_probe(struct platform_device *pdev) ...@@ -1945,7 +1945,7 @@ fec_probe(struct platform_device *pdev)
fec_reset_phy(pdev); fec_reset_phy(pdev);
if (fep->bufdesc_ex) if (fep->bufdesc_ex)
fec_ptp_init(ndev, pdev); fec_ptp_init(pdev);
ret = fec_enet_init(ndev); ret = fec_enet_init(ndev);
if (ret) if (ret)
......
...@@ -347,8 +347,9 @@ static void fec_time_keep(unsigned long _data) ...@@ -347,8 +347,9 @@ static void fec_time_keep(unsigned long _data)
* cyclecounter init routine and exits. * cyclecounter init routine and exits.
*/ */
void fec_ptp_init(struct net_device *ndev, struct platform_device *pdev) void fec_ptp_init(struct platform_device *pdev)
{ {
struct net_device *ndev = platform_get_drvdata(pdev);
struct fec_enet_private *fep = netdev_priv(ndev); struct fec_enet_private *fep = netdev_priv(ndev);
fep->ptp_caps.owner = THIS_MODULE; fep->ptp_caps.owner = THIS_MODULE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment