All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ptp: Set lookup cookie when creating a PTP PPS source.
@ 2021-06-28 18:25 Jonathan Lemon
  2021-06-28 23:38 ` Richard Cochran
  2021-06-29 18:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 8+ messages in thread
From: Jonathan Lemon @ 2021-06-28 18:25 UTC (permalink / raw)
  To: netdev, richardcochran; +Cc: kernel-team

When creating a PTP device, the configuration block allows
creation of an associated PPS device.  However, there isn't
any way to associate the two devices after creation.

Set the PPS cookie, so pps_lookup_dev(ptp) performs correctly.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
---
 drivers/ptp/ptp_clock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index c176fa82df85..45429853d60f 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -240,6 +240,7 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
 			pr_err("failed to create ptp aux_worker %d\n", err);
 			goto kworker_err;
 		}
+		ptp->pps_source->lookup_cookie = ptp;
 	}
 
 	err = ptp_populate_pin_groups(ptp);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-07-07  0:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 18:25 [PATCH] ptp: Set lookup cookie when creating a PTP PPS source Jonathan Lemon
2021-06-28 23:38 ` Richard Cochran
2021-06-29  0:08   ` Jonathan Lemon
2021-07-02  0:39   ` Vladimir Oltean
2021-07-02  1:28     ` Richard Cochran
2021-07-07  0:26     ` Jonathan Lemon
2021-06-29 18:40 ` patchwork-bot+netdevbpf
2021-06-30  0:11   ` Richard Cochran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.