From bf111baf4a2e32cfdad44df3aacfba38ce7b3ec3 Mon Sep 17 00:00:00 2001 From: abhijit Date: Sun, 18 Jun 2017 01:54:25 +0530 Subject: ptp-notifier: Changed get_ptp_hwtime callback Issue: Current callback directly uses the hw interface function without ptp_lock. This might give wrong HW PTP time. Fix: Defined wrapper function which uses ptp_lock for reading the HW PTP time. Added this wrapper function as callback for get_ptp_hwtime. Bug 200316642 Change-Id: I2db4fefbf5ffbea6353bcb6b4f9b675e0becb165 Signed-off-by: Abhijit Reviewed-on: https://git-master/r/1504339 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sumeet Gupta --- include/linux/platform/tegra/ptp-notifier.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/platform/tegra/ptp-notifier.h b/include/linux/platform/tegra/ptp-notifier.h index 57a7b0070..17bd5e52c 100644 --- a/include/linux/platform/tegra/ptp-notifier.h +++ b/include/linux/platform/tegra/ptp-notifier.h @@ -21,7 +21,7 @@ #if IS_ENABLED(CONFIG_TEGRA_PTP_NOTIFIER) /* register / unregister HW time source */ -void tegra_register_hwtime_source(u64 (*func)(void)); +void tegra_register_hwtime_source(u64 (*func)(void *), void *data); void tegra_unregister_hwtime_source(void); /* clients registering / unregistering for time update events */ @@ -41,7 +41,8 @@ u64 get_ptp_hwtime(void); #else /* CONFIG_TEGRA_PTP_NOTIFIER */ /* register / unregister HW time source */ -static inline void tegra_register_hwtime_source(u64 (*func)(void)) +static inline void tegra_register_hwtime_source(u64 (*func)(void *), + void *data) { } -- cgit v1.2.2