]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/thunderbolt/xdomain.c
Merge tag 'for-linus-20191129' of git://git.kernel.dk/linux-block
[linux.git] / drivers / thunderbolt / xdomain.c
index 4e17a7c7bf0ae58857493fed470107dda00620b6..880d784398a379529b3d865f54d27bbce2651472 100644 (file)
@@ -1404,10 +1404,9 @@ struct tb_xdomain_lookup {
 static struct tb_xdomain *switch_find_xdomain(struct tb_switch *sw,
        const struct tb_xdomain_lookup *lookup)
 {
-       int i;
+       struct tb_port *port;
 
-       for (i = 1; i <= sw->config.max_port_number; i++) {
-               struct tb_port *port = &sw->ports[i];
+       tb_switch_for_each_port(sw, port) {
                struct tb_xdomain *xd;
 
                if (port->xdomain) {