Hi Rob, again > > > - for_each_endpoint_of_node(node, endpoint) { > > > - if (endpoint == ep) > > > + for_each_port_of_node(node, p) { > > > + if (port == p) > > > id = i; > > > i++; > > > } > > > > This is fragile because it assumes 0-N port numbering. While that's > > usually true, it's not guaranteed. > > > > Just add a of_graph_get_port_id() that reads and returns 'reg' value > > or 0 if no 'reg'. Or just use of_graph_parse_endpoint(). > > OK, will think about this. > How about [1/2] patch ? Is it good or not ? Thank you for your advice. of_graph_parse_endpoint() was good enough ! Best regards --- Kuninori Morimoto