From: Jonathan Lemon Date: Wed, 15 Sep 2021 02:16:20 +0000 (-0700) Subject: ptp: ocp: Parameterize the TOD information display. X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=498ad3f4389a1f1d2b0e09fa8f906152b0cfaf67;p=linux.git ptp: ocp: Parameterize the TOD information display. Only display the TOD information if there is a corresponding TOD resource. Signed-off-by: Jonathan Lemon Signed-off-by: David S. Miller --- diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c index d37eac69150ac..2a6cc762c60e4 100644 --- a/drivers/ptp/ptp_ocp.c +++ b/drivers/ptp/ptp_ocp.c @@ -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 *