diff options
author | Gerhard Engleder <gerhard@engleder-embedded.com> | 2022-05-06 23:01:39 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-05-10 10:48:08 +0300 |
commit | d58809d854c9ee19e4cd41023e137e65e9dc3f94 (patch) | |
tree | f86bb3e845ae311198669bfc90f2f0d4b1a4f3d7 /include/linux/ptp_clock_kernel.h | |
parent | 51eb7492af276b5b4d27cfa4474d40bdac7b9cf8 (diff) | |
download | linux-d58809d854c9ee19e4cd41023e137e65e9dc3f94.tar.xz |
ptp: Pass hwtstamp to ptp_convert_timestamp()
ptp_convert_timestamp() converts only the timestamp hwtstamp, which is
a field of the argument with the type struct skb_shared_hwtstamps *. So
a pointer to the hwtstamp field of this structure is sufficient.
Rework ptp_convert_timestamp() to use an argument of type ktime_t *.
This allows to add additional timestamp manipulation stages before the
call of ptp_convert_timestamp().
Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/ptp_clock_kernel.h')
-rw-r--r-- | include/linux/ptp_clock_kernel.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h index ad309202cf9f..92b44161408e 100644 --- a/include/linux/ptp_clock_kernel.h +++ b/include/linux/ptp_clock_kernel.h @@ -384,17 +384,16 @@ int ptp_get_vclocks_index(int pclock_index, int **vclock_index); /** * ptp_convert_timestamp() - convert timestamp to a ptp vclock time * - * @hwtstamps: skb_shared_hwtstamps structure pointer + * @hwtstamp: timestamp * @vclock_index: phc index of ptp vclock. * * Returns converted timestamp, or 0 on error. */ -ktime_t ptp_convert_timestamp(const struct skb_shared_hwtstamps *hwtstamps, - int vclock_index); +ktime_t ptp_convert_timestamp(const ktime_t *hwtstamp, int vclock_index); #else static inline int ptp_get_vclocks_index(int pclock_index, int **vclock_index) { return 0; } -static inline ktime_t ptp_convert_timestamp(const struct skb_shared_hwtstamps *hwtstamps, +static inline ktime_t ptp_convert_timestamp(const ktime_t *hwtstamp, int vclock_index) { return 0; } |