Skip to content

Commit

Permalink
gianfar: fix phc index build failure
Browse files Browse the repository at this point in the history
This patch fixes a build failure introduced in commit 6663628
("gianfar: Support the get_ts_info ethtool method."). Not only was a
global variable inconsistently named, but also it was not exported as
it should have been.

This fix is also needed in stable version 3.5.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Richard Cochran authored and David S. Miller committed Sep 21, 2012
1 parent f950c0e commit 28889b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/freescale/gianfar_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1773,6 +1773,7 @@ static int gfar_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
}

int gfar_phc_index = -1;
EXPORT_SYMBOL(gfar_phc_index);

static int gfar_get_ts_info(struct net_device *dev,
struct ethtool_ts_info *info)
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/freescale/gianfar_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ static int gianfar_ptp_probe(struct platform_device *dev)
err = PTR_ERR(etsects->clock);
goto no_clock;
}
gfar_phc_clock = ptp_clock_index(etsects->clock);
gfar_phc_index = ptp_clock_index(etsects->clock);

dev_set_drvdata(&dev->dev, etsects);

Expand All @@ -539,7 +539,7 @@ static int gianfar_ptp_remove(struct platform_device *dev)
gfar_write(&etsects->regs->tmr_temask, 0);
gfar_write(&etsects->regs->tmr_ctrl, 0);

gfar_phc_clock = -1;
gfar_phc_index = -1;
ptp_clock_unregister(etsects->clock);
iounmap(etsects->regs);
release_resource(etsects->rsrc);
Expand Down

0 comments on commit 28889b7

Please sign in to comment.