diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-06-07 10:48:00 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-07 14:41:07 -0700 |
commit | ca162a82f56921442f5db72a3a472010e5a62c4b (patch) | |
tree | 292a2e4cf3eed58f61e8557a2069f987594e4dd5 /drivers | |
parent | 28850dc7c71da9d0c0e39246e9ff6913f41f8d0a (diff) |
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: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/fec.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/fec_ptp.c | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index b11cdbcc04ff..e3ed6c5ae801 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -275,7 +275,7 @@ struct fec_enet_private { 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); int fec_ptp_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd); diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index c42c42a0cc57..fa4a68fc01cb 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1945,7 +1945,7 @@ fec_probe(struct platform_device *pdev) fec_reset_phy(pdev); if (fep->bufdesc_ex) - fec_ptp_init(ndev, pdev); + fec_ptp_init(pdev); ret = fec_enet_init(ndev); if (ret) diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c index 25fc960cbf0e..5007e4f9fff9 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -347,8 +347,9 @@ static void fec_time_keep(unsigned long _data) * 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); fep->ptp_caps.owner = THIS_MODULE; |