ptp: ocp: Parameterize the TOD information display.

Only display the TOD information if there is a corresponding
TOD resource.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jonathan Lemon 2021-09-14 19:16:20 -07:00 committed by David S. Miller
parent 1618df6afa
commit 498ad3f438

View file

@ -743,7 +743,8 @@ ptp_ocp_info(struct ptp_ocp *bp)
ptp_ocp_clock_name_from_val(select >> 16),
ptp_clock_index(bp->ptp));
ptp_ocp_tod_info(bp);
if (bp->tod)
ptp_ocp_tod_info(bp);
}
static struct device *