Convert call sites to the proper method for testing time stamp info validity.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>master
parent
3d388e1992
commit
605abc45dd
4
clock.c
4
clock.c
|
@ -956,7 +956,7 @@ struct clock *clock_create(enum clock_type type, struct config *config,
|
|||
interface_set_label(iface, ts_label);
|
||||
interface_ensure_tslabel(iface);
|
||||
interface_get_tsinfo(iface);
|
||||
if (iface->ts_info.valid &&
|
||||
if (interface_tsinfo_valid(iface) &&
|
||||
((iface->ts_info.so_timestamping & required_modes) != required_modes)) {
|
||||
pr_err("interface '%s' does not support requested timestamping mode",
|
||||
interface_name(iface));
|
||||
|
@ -975,7 +975,7 @@ struct clock *clock_create(enum clock_type type, struct config *config,
|
|||
if (1 != sscanf(phc_device, "/dev/ptp%d", &phc_index)) {
|
||||
phc_index = -1;
|
||||
}
|
||||
} else if (iface->ts_info.valid) {
|
||||
} else if (interface_tsinfo_valid(iface)) {
|
||||
phc_index = interface_phc_index(iface);
|
||||
} else {
|
||||
pr_err("PTP device not specified and automatic determination"
|
||||
|
|
4
port.c
4
port.c
|
@ -2511,7 +2511,7 @@ void port_link_status(void *ctx, int linkup, int ts_index)
|
|||
interface_get_tsinfo(p->iface);
|
||||
|
||||
/* Only switch phc with HW time stamping mode */
|
||||
if (p->iface->ts_info.valid &&
|
||||
if (interface_tsinfo_valid(p->iface) &&
|
||||
interface_phc_index(p->iface) >= 0) {
|
||||
required_modes = clock_required_modes(p->clock);
|
||||
if ((p->iface->ts_info.so_timestamping & required_modes) != required_modes) {
|
||||
|
@ -3001,7 +3001,7 @@ struct port *port_open(const char *phc_device,
|
|||
|
||||
if (transport == TRANS_UDS) {
|
||||
; /* UDS cannot have a PHC. */
|
||||
} else if (!interface->ts_info.valid) {
|
||||
} else if (!interface_tsinfo_valid(interface)) {
|
||||
pr_warning("port %d: get_ts_info not supported", number);
|
||||
} else if (phc_index >= 0 &&
|
||||
phc_index != interface_phc_index(interface)) {
|
||||
|
|
Loading…
Reference in New Issue