diff options
author | Richard Cochran <richardcochran@gmail.com> | 2014-12-21 19:47:02 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-30 18:29:26 -0500 |
commit | 5ee698e3677a1af8b731cc891e94be33b6572cfd (patch) | |
tree | 941d9ffe13750c04135ab39167f1413b179be670 /drivers/net/ethernet/intel | |
parent | f4de2b95688eba646d677dd2bed8c49540c00f1e (diff) | |
download | linux-stable-5ee698e3677a1af8b731cc891e94be33b6572cfd.tar.gz linux-stable-5ee698e3677a1af8b731cc891e94be33b6572cfd.tar.bz2 linux-stable-5ee698e3677a1af8b731cc891e94be33b6572cfd.zip |
net: igb: convert to timecounter adjtime.
This patch changes the driver to use the new and improved method
for adjusting the offset of a timecounter.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_ptp.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c index 794c139f0cc0..1d27f2d3b57c 100644 --- a/drivers/net/ethernet/intel/igb/igb_ptp.c +++ b/drivers/net/ethernet/intel/igb/igb_ptp.c @@ -256,14 +256,9 @@ static int igb_ptp_adjtime_82576(struct ptp_clock_info *ptp, s64 delta) struct igb_adapter *igb = container_of(ptp, struct igb_adapter, ptp_caps); unsigned long flags; - s64 now; spin_lock_irqsave(&igb->tmreg_lock, flags); - - now = timecounter_read(&igb->tc); - now += delta; - timecounter_init(&igb->tc, &igb->cc, now); - + timecounter_adjtime(&igb->tc, delta); spin_unlock_irqrestore(&igb->tmreg_lock, flags); return 0; |