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>
This commit is contained in:
Fabio Estevam 2013-06-07 10:48:00 +00:00 committed by David S. Miller
parent 28850dc7c7
commit ca162a82f5
3 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -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)

View File

@ -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;