diff mbox series

[net-next] ethernet: ti: cpts: use ktime_get_real_ns helper

Message ID 20191107200158.25978-1-ivan.khoronzhuk@linaro.org
State Accepted
Commit 693bd8b7ae46f04d6d7c868a08b35d28baacdab1
Headers show
Series [net-next] ethernet: ti: cpts: use ktime_get_real_ns helper | expand

Commit Message

Ivan Khoronzhuk Nov. 7, 2019, 8:01 p.m. UTC
Update on more short variant for getting real clock in ns.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>

---
 drivers/net/ethernet/ti/cpts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.20.1

Comments

David Miller Nov. 8, 2019, 3:59 a.m. UTC | #1
From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>

Date: Thu,  7 Nov 2019 22:01:58 +0200

> Update on more short variant for getting real clock in ns.

> 

> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>


Applied.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 61136428e2c0..729ce09dded9 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -459,7 +459,7 @@  int cpts_register(struct cpts *cpts)
 	cpts_write32(cpts, CPTS_EN, control);
 	cpts_write32(cpts, TS_PEND_EN, int_enable);
 
-	timecounter_init(&cpts->tc, &cpts->cc, ktime_to_ns(ktime_get_real()));
+	timecounter_init(&cpts->tc, &cpts->cc, ktime_get_real_ns());
 
 	cpts->clock = ptp_clock_register(&cpts->info, cpts->dev);
 	if (IS_ERR(cpts->clock)) {