net: igb: convert to timecounter adjtime.
authorRichard Cochran <richardcochran@gmail.com>
Sun, 21 Dec 2014 18:47:02 +0000 (19:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Dec 2014 23:29:26 +0000 (18:29 -0500)
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>
drivers/net/ethernet/intel/igb/igb_ptp.c

index 794c139f0cc04f86bf8319ea7e42840677db2c6c..1d27f2d3b57c79a5adfe47c26d53097ba1f81a3a 100644 (file)
@@ -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;