linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: lan743x_ptp: convert to ktime_get_clocktai_ts64
@ 2018-08-15 17:49 Arnd Bergmann
  2018-08-15 18:03 ` Bryan.Whitehead
  2018-08-19 17:58 ` David Miller
  0 siblings, 2 replies; 10+ messages in thread
From: Arnd Bergmann @ 2018-08-15 17:49 UTC (permalink / raw)
  To: Bryan Whitehead, Microchip Linux Driver Support
  Cc: Arnd Bergmann, David S. Miller, Yue Haibing, netdev, linux-kernel

timekeeping_clocktai64() has been renamed to ktime_get_clocktai_ts64()
for consistency with the other ktime_get_* access functions.

Rename the new caller that has come up as well.

Question: this is the only ptp driver that sets the hardware time
to the current system time in TAI. Why does it do that?

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/microchip/lan743x_ptp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.c b/drivers/net/ethernet/microchip/lan743x_ptp.c
index 029a2af90d5e..0e851fa3e0cc 100644
--- a/drivers/net/ethernet/microchip/lan743x_ptp.c
+++ b/drivers/net/ethernet/microchip/lan743x_ptp.c
@@ -832,8 +832,7 @@ static void lan743x_ptp_sync_to_system_clock(struct lan743x_adapter *adapter)
 {
 	struct timespec64 ts;
 
-	memset(&ts, 0, sizeof(ts));
-	timekeeping_clocktai64(&ts);
+	ktime_get_clocktai_ts64(&ts);
 
 	lan743x_ptp_clock_set(adapter, ts.tv_sec, ts.tv_nsec, 0);
 }
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-08-19 17:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-15 17:49 [PATCH] net: lan743x_ptp: convert to ktime_get_clocktai_ts64 Arnd Bergmann
2018-08-15 18:03 ` Bryan.Whitehead
2018-08-15 20:33   ` Arnd Bergmann
2018-08-15 20:41     ` Bryan.Whitehead
2018-08-15 20:44       ` Arnd Bergmann
2018-08-15 20:50         ` Bryan.Whitehead
2018-08-17 16:25           ` Richard Cochran
2018-08-17 19:29             ` Arnd Bergmann
2018-08-18  0:09               ` Richard Cochran
2018-08-19 17:58 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).