summaryrefslogtreecommitdiffstats
path: root/drivers/ptp/ptp_chardev.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-06-18 16:20:39 +0200
committerDavid S. Miller <davem@davemloft.net>2018-06-20 00:59:53 +0200
commitf696a21c229ac3e85bc239efc52f4530b43002c5 (patch)
tree468dd0613b3c9781a322164399acb2d34c0cd1cb /drivers/ptp/ptp_chardev.c
parentnet/ipv6: respect rcu grace period before freeing fib6_info (diff)
downloadlinux-f696a21c229ac3e85bc239efc52f4530b43002c5.tar.xz
linux-f696a21c229ac3e85bc239efc52f4530b43002c5.zip
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: Arnd Bergmann <arnd@arndb.de> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp/ptp_chardev.c')
-rw-r--r--drivers/ptp/ptp_chardev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 767c485af59b..547dbdac9d54 100644
--- a/drivers/ptp/ptp_chardev.c
+++ b/drivers/ptp/ptp_chardev.c
@@ -221,7 +221,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
}
pct = &sysoff->ts[0];
for (i = 0; i < sysoff->n_samples; i++) {
- getnstimeofday64(&ts);
+ ktime_get_real_ts64(&ts);
pct->sec = ts.tv_sec;
pct->nsec = ts.tv_nsec;
pct++;
@@ -230,7 +230,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
pct->nsec = ts.tv_nsec;
pct++;
}
- getnstimeofday64(&ts);
+ ktime_get_real_ts64(&ts);
pct->sec = ts.tv_sec;
pct->nsec = ts.tv_nsec;
if (copy_to_user((void __user *)arg, sysoff, sizeof(*sysoff)))