[PATCH 18/27] bnx2x: Use timecounter_reset interface

From: Sagar Arun Kamble
Date: Fri Dec 15 2017 - 02:40:04 EST


With new interface timecounter_reset we can update the start time for
timecounter. Update bnx2x_ptp_settime with this new function.

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
Cc: Richard Cochran <richardcochran@xxxxxxxxx>
Cc: Ariel Elior <ariel.elior@xxxxxxxxxx>
Cc: everest-linux-l2@xxxxxxxxxx
Cc: netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 1e10a81..e30e736 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -13849,8 +13849,8 @@ static int bnx2x_ptp_settime(struct ptp_clock_info *ptp,

DP(BNX2X_MSG_PTP, "PTP settime called, ns = %llu\n", ns);

- /* Re-init the timecounter */
- timecounter_init(&bp->timecounter, ns);
+ /* Reset the timecounter */
+ timecounter_reset(&bp->timecounter, ns);

return 0;
}
--
1.9.1