Skip to content

Commit

Permalink
fec: Only pass pdev in fec_ptp_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and David S. Miller committed Jun 7, 2013
1 parent 28850dc commit ca162a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/fec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/freescale/fec_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ca162a8

Please sign in to comment.