diff options
author | Miroslav Lichvar <mlichvar@redhat.com> | 2018-11-09 11:14:45 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-10 04:43:51 +0100 |
commit | 916444df305ef5b8a7d824aac7dd2aeba3a4db3b (patch) | |
tree | 3ca50fe4899713cf88c290d949e321d1a36ebfe2 /drivers/ptp/ptp_clock.c | |
parent | ptp: add PTP_SYS_OFFSET_EXTENDED ioctl (diff) | |
download | linux-916444df305ef5b8a7d824aac7dd2aeba3a4db3b.tar.xz linux-916444df305ef5b8a7d824aac7dd2aeba3a4db3b.zip |
ptp: deprecate gettime64() in favor of gettimex64()
When a driver provides gettimex64(), use it in the PTP_SYS_OFFSET ioctl
and POSIX clock's gettime() instead of gettime64(). Drivers should
provide only one of the functions.
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp/ptp_clock.c')
-rw-r--r-- | drivers/ptp/ptp_clock.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c index 5419a89d300e..40fda23e4b05 100644 --- a/drivers/ptp/ptp_clock.c +++ b/drivers/ptp/ptp_clock.c @@ -117,7 +117,10 @@ static int ptp_clock_gettime(struct posix_clock *pc, struct timespec64 *tp) struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); int err; - err = ptp->info->gettime64(ptp->info, tp); + if (ptp->info->gettimex64) + err = ptp->info->gettimex64(ptp->info, tp, NULL); + else + err = ptp->info->gettime64(ptp->info, tp); return err; } |