clock: remove redundant parameter from the create method.
There is no need for the 'ifaces' parameter since the list of network interfaces is already present in the configuration. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
9b27664cfc
commit
bbe55fbea4
7
clock.c
7
clock.c
|
@ -798,8 +798,7 @@ static void clock_remove_port(struct clock *c, struct port *p)
|
|||
port_close(p);
|
||||
}
|
||||
|
||||
struct clock *clock_create(struct config *config, int phc_index,
|
||||
struct interfaces_head *ifaces)
|
||||
struct clock *clock_create(struct config *config, int phc_index)
|
||||
{
|
||||
enum timestamp_type timestamping =
|
||||
config_get_int(config, NULL, "time_stamping");
|
||||
|
@ -810,7 +809,7 @@ struct clock *clock_create(struct config *config, int phc_index,
|
|||
unsigned char oui[OUI_LEN];
|
||||
char phc[32], *tmp;
|
||||
struct interface *udsif = &c->uds_interface;
|
||||
struct interface *iface = STAILQ_FIRST(ifaces);
|
||||
struct interface *iface = STAILQ_FIRST(&config->interfaces);
|
||||
struct timespec ts;
|
||||
int sfl;
|
||||
|
||||
|
@ -1017,7 +1016,7 @@ struct clock *clock_create(struct config *config, int phc_index,
|
|||
clock_fda_changed(c);
|
||||
|
||||
/* Create the ports. */
|
||||
STAILQ_FOREACH(iface, ifaces, list) {
|
||||
STAILQ_FOREACH(iface, &config->interfaces, list) {
|
||||
if (clock_add_port(c, phc_index, timestamping, iface)) {
|
||||
pr_err("failed to open port %s", iface->name);
|
||||
return NULL;
|
||||
|
|
4
clock.h
4
clock.h
|
@ -71,11 +71,9 @@ struct config *clock_config(struct clock *c);
|
|||
* @param config Pointer to the configuration database.
|
||||
* @param phc_index PTP hardware clock device to use.
|
||||
* Pass -1 to select CLOCK_REALTIME.
|
||||
* @param ifaces A queue of network interfaces.
|
||||
* @return A pointer to the single global clock instance.
|
||||
*/
|
||||
struct clock *clock_create(struct config *config, int phc_index,
|
||||
struct interfaces_head *ifaces);
|
||||
struct clock *clock_create(struct config *config, int phc_index);
|
||||
|
||||
/**
|
||||
* Obtains a clock's default data set.
|
||||
|
|
Loading…
Reference in New Issue