On Thu, Jan 28, 2021 at 04:25:10PM +0100, Miroslav Lichvar wrote:

> @@ -1180,11 +1208,12 @@ struct clock *clock_create(enum clock_type type, 
> struct config *config,
>               return NULL;
>       }
>  
> -     /* Create the UDS interface. */
> +     /* Create the UDS interfaces. */
> +
>       c->uds_rw_port = port_open(phc_device, phc_index, timestamping, 0,
>                                  c->uds_rw_if, c);
>       if (!c->uds_rw_port) {
> -             pr_err("failed to open the UDS port");
> +             pr_err("failed to open the UDS-RW port");
>               return NULL;
>       }
>       clock_fda_changed(c);
> @@ -1195,6 +1224,14 @@ struct clock *clock_create(enum clock_type type, 
> struct config *config,
>               return NULL;
>       }
>  
> +     c->uds_ro_port = port_open(phc_device, phc_index, timestamping, 0,
> +                                c->uds_ro_if, c);
> +     if (!c->uds_ro_port) {
> +             pr_err("failed to open the UDS-RO port");
> +             return NULL;
> +     }
> +     clock_fda_changed(c);

This chunk could be placed a few lines above, before monitor_create().
You could also avoid calling clock_fda_changed() twice in a row.

Thanks,
Richard


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to