diff options
author | Miroslav Lichvar <mlichvar@redhat.com> | 2018-11-09 11:14:45 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-09 19:43:51 -0800 |
commit | 916444df305ef5b8a7d824aac7dd2aeba3a4db3b (patch) | |
tree | 3ca50fe4899713cf88c290d949e321d1a36ebfe2 /drivers/ptp/ptp_chardev.c | |
parent | 361800876f80da3915c46e388fc682532228b2c3 (diff) | |
download | lwn-916444df305ef5b8a7d824aac7dd2aeba3a4db3b.tar.gz lwn-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_chardev.c')
-rw-r--r-- | drivers/ptp/ptp_chardev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c index aad0d36cf5c0..797fab33bb98 100644 --- a/drivers/ptp/ptp_chardev.c +++ b/drivers/ptp/ptp_chardev.c @@ -260,7 +260,10 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg) pct->sec = ts.tv_sec; pct->nsec = ts.tv_nsec; pct++; - err = ptp->info->gettime64(ptp->info, &ts); + if (ops->gettimex64) + err = ops->gettimex64(ops, &ts, NULL); + else + err = ops->gettime64(ops, &ts); if (err) goto out; pct->sec = ts.tv_sec; |