Skip to content

Commit 8602e40

Browse files
jlemondavem330
authored andcommitted
ptp: Set lookup cookie when creating a PTP PPS source.
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c79fa61 commit 8602e40

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/ptp/ptp_clock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
218218
pr_err("failed to create ptp aux_worker %d\n", err);
219219
goto kworker_err;
220220
}
221+
ptp->pps_source->lookup_cookie = ptp;
221222
}
222223

223224
err = ptp_populate_pin_groups(ptp);

0 commit comments

Comments
 (0)