Commit f696a21c authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller

ptp: replace getnstimeofday64() with ktime_get_real_ts64()

getnstimeofday64() is deprecated and getting replaced throughout
the kernel with ktime_get_*() based helpers for a more consistent
interface.

The two functions do the exact same thing, so this is just
a cosmetic change.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b0a8da8
...@@ -221,7 +221,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg) ...@@ -221,7 +221,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
} }
pct = &sysoff->ts[0]; pct = &sysoff->ts[0];
for (i = 0; i < sysoff->n_samples; i++) { for (i = 0; i < sysoff->n_samples; i++) {
getnstimeofday64(&ts); ktime_get_real_ts64(&ts);
pct->sec = ts.tv_sec; pct->sec = ts.tv_sec;
pct->nsec = ts.tv_nsec; pct->nsec = ts.tv_nsec;
pct++; pct++;
...@@ -230,7 +230,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg) ...@@ -230,7 +230,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
pct->nsec = ts.tv_nsec; pct->nsec = ts.tv_nsec;
pct++; pct++;
} }
getnstimeofday64(&ts); ktime_get_real_ts64(&ts);
pct->sec = ts.tv_sec; pct->sec = ts.tv_sec;
pct->nsec = ts.tv_nsec; pct->nsec = ts.tv_nsec;
if (copy_to_user((void __user *)arg, sysoff, sizeof(*sysoff))) if (copy_to_user((void __user *)arg, sysoff, sizeof(*sysoff)))
......
...@@ -374,7 +374,7 @@ static int qoriq_ptp_probe(struct platform_device *dev) ...@@ -374,7 +374,7 @@ static int qoriq_ptp_probe(struct platform_device *dev)
pr_err("ioremap ptp registers failed\n"); pr_err("ioremap ptp registers failed\n");
goto no_ioremap; goto no_ioremap;
} }
getnstimeofday64(&now); ktime_get_real_ts64(&now);
ptp_qoriq_settime(&qoriq_ptp->caps, &now); ptp_qoriq_settime(&qoriq_ptp->caps, &now);
tmr_ctrl = tmr_ctrl =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment