Lines Matching refs:right
405 static int link_peers(struct usb_port *left, struct usb_port *right) in link_peers() argument
410 if (left->peer == right && right->peer == left) in link_peers()
413 if (left->peer || right->peer) { in link_peers()
415 struct usb_port *rpeer = right->peer; in link_peers()
418 if (left->location && left->location == right->location) in link_peers()
424 dev_name(&left->dev), dev_name(&right->dev), method, in link_peers()
427 dev_name(&right->dev), in link_peers()
432 rc = sysfs_create_link(&left->dev.kobj, &right->dev.kobj, "peer"); in link_peers()
435 rc = sysfs_create_link(&right->dev.kobj, &left->dev.kobj, "peer"); in link_peers()
448 WARN_ON(right->is_superspeed); in link_peers()
449 hs_port = right; in link_peers()
451 ss_port = right; in link_peers()
452 WARN_ON(!right->is_superspeed); in link_peers()
457 left->peer = right; in link_peers()
458 right->peer = left; in link_peers()
474 static void link_peers_report(struct usb_port *left, struct usb_port *right) in link_peers_report() argument
478 rc = link_peers(left, right); in link_peers_report()
480 dev_dbg(&left->dev, "peered to %s\n", dev_name(&right->dev)); in link_peers_report()
483 dev_name(&right->dev), rc); in link_peers_report()
489 static void unlink_peers(struct usb_port *left, struct usb_port *right) in unlink_peers() argument
493 WARN(right->peer != left || left->peer != right, in unlink_peers()
495 dev_name(&left->dev), dev_name(&right->dev)); in unlink_peers()
504 hs_port = right; in unlink_peers()
506 ss_port = right; in unlink_peers()
513 right->peer = NULL; in unlink_peers()
514 sysfs_remove_link(&right->dev.kobj, "peer"); in unlink_peers()