diff options
author | Vladimir Oltean <olteanv@gmail.com> | 2019-12-27 15:02:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-30 20:31:40 -0800 |
commit | 544fed47af4d2174ac0b550e9c8da15c2dfdb117 (patch) | |
tree | 5a8edec5ce8eeb87738109c4bca5fa833dfba124 /include | |
parent | db99d5126fb9067c3123b40a33c9936235f059fa (diff) |
ptp: introduce ptp_cancel_worker_sync
In order to effectively use the PTP kernel thread for tasks such as
timestamping packets, allow the user control over stopping it, which is
needed e.g. when the timestamping queues must be drained.
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ptp_clock_kernel.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h index 93cc4f1d444a..c64a1ef87240 100644 --- a/include/linux/ptp_clock_kernel.h +++ b/include/linux/ptp_clock_kernel.h @@ -243,6 +243,13 @@ int ptp_find_pin(struct ptp_clock *ptp, int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay); +/** + * ptp_cancel_worker_sync() - cancel ptp auxiliary clock + * + * @ptp: The clock obtained from ptp_clock_register(). + */ +void ptp_cancel_worker_sync(struct ptp_clock *ptp); + #else static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) @@ -260,6 +267,8 @@ static inline int ptp_find_pin(struct ptp_clock *ptp, static inline int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay) { return -EOPNOTSUPP; } +static inline void ptp_cancel_worker_sync(struct ptp_clock *ptp) +{ } #endif |