summaryrefslogtreecommitdiff
path: root/include/linux/ptp_clock_kernel.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2025-10-07 21:53:13 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2025-10-07 21:53:13 -0700
commit8b87f67b4c87452e21721887fa8dec1f4c6b2b7c (patch)
tree2c163f512e5d7f8400b42a7a8439e2b06492a870 /include/linux/ptp_clock_kernel.h
parent30989f67650cbf8dc763f7c22e3a210f70a8d7d0 (diff)
parentc7866ee0a9ddd9789faadf58cdac6abd7aabf045 (diff)
Merge branch 'next' into for-linus
Prepare input updates for 6.18 merge window.
Diffstat (limited to 'include/linux/ptp_clock_kernel.h')
-rw-r--r--include/linux/ptp_clock_kernel.h34
1 files changed, 4 insertions, 30 deletions
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h
index eced7e9bf69a..3d089bd4d5e9 100644
--- a/include/linux/ptp_clock_kernel.h
+++ b/include/linux/ptp_clock_kernel.h
@@ -477,40 +477,14 @@ static inline ktime_t ptp_convert_timestamp(const ktime_t *hwtstamp,
static inline void ptp_read_system_prets(struct ptp_system_timestamp *sts)
{
- if (sts) {
- switch (sts->clockid) {
- case CLOCK_REALTIME:
- ktime_get_real_ts64(&sts->pre_ts);
- break;
- case CLOCK_MONOTONIC:
- ktime_get_ts64(&sts->pre_ts);
- break;
- case CLOCK_MONOTONIC_RAW:
- ktime_get_raw_ts64(&sts->pre_ts);
- break;
- default:
- break;
- }
- }
+ if (sts)
+ ktime_get_clock_ts64(sts->clockid, &sts->pre_ts);
}
static inline void ptp_read_system_postts(struct ptp_system_timestamp *sts)
{
- if (sts) {
- switch (sts->clockid) {
- case CLOCK_REALTIME:
- ktime_get_real_ts64(&sts->post_ts);
- break;
- case CLOCK_MONOTONIC:
- ktime_get_ts64(&sts->post_ts);
- break;
- case CLOCK_MONOTONIC_RAW:
- ktime_get_raw_ts64(&sts->post_ts);
- break;
- default:
- break;
- }
- }
+ if (sts)
+ ktime_get_clock_ts64(sts->clockid, &sts->post_ts);
}
#endif