Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arnd Bergmann and committed by
David S. Miller
f696a21c 9b0a8da8

+3 -3
+2 -2
drivers/ptp/ptp_chardev.c
··· 221 221 } 222 222 pct = &sysoff->ts[0]; 223 223 for (i = 0; i < sysoff->n_samples; i++) { 224 - getnstimeofday64(&ts); 224 + ktime_get_real_ts64(&ts); 225 225 pct->sec = ts.tv_sec; 226 226 pct->nsec = ts.tv_nsec; 227 227 pct++; ··· 230 230 pct->nsec = ts.tv_nsec; 231 231 pct++; 232 232 } 233 - getnstimeofday64(&ts); 233 + ktime_get_real_ts64(&ts); 234 234 pct->sec = ts.tv_sec; 235 235 pct->nsec = ts.tv_nsec; 236 236 if (copy_to_user((void __user *)arg, sysoff, sizeof(*sysoff)))
+1 -1
drivers/ptp/ptp_qoriq.c
··· 374 374 pr_err("ioremap ptp registers failed\n"); 375 375 goto no_ioremap; 376 376 } 377 - getnstimeofday64(&now); 377 + ktime_get_real_ts64(&now); 378 378 ptp_qoriq_settime(&qoriq_ptp->caps, &now); 379 379 380 380 tmr_ctrl =