Lines Matching refs:right

321 static int link_peers(struct usb_port *left, struct usb_port *right)  in link_peers()  argument
326 if (left->peer == right && right->peer == left) in link_peers()
329 if (left->peer || right->peer) { in link_peers()
331 struct usb_port *rpeer = right->peer; in link_peers()
334 if (left->location && left->location == right->location) in link_peers()
340 dev_name(&left->dev), dev_name(&right->dev), method, in link_peers()
343 dev_name(&right->dev), in link_peers()
348 rc = sysfs_create_link(&left->dev.kobj, &right->dev.kobj, "peer"); in link_peers()
351 rc = sysfs_create_link(&right->dev.kobj, &left->dev.kobj, "peer"); in link_peers()
364 WARN_ON(right->is_superspeed); in link_peers()
365 hs_port = right; in link_peers()
367 ss_port = right; in link_peers()
368 WARN_ON(!right->is_superspeed); in link_peers()
373 left->peer = right; in link_peers()
374 right->peer = left; in link_peers()
390 static void link_peers_report(struct usb_port *left, struct usb_port *right) in link_peers_report() argument
394 rc = link_peers(left, right); in link_peers_report()
396 dev_dbg(&left->dev, "peered to %s\n", dev_name(&right->dev)); in link_peers_report()
399 dev_name(&right->dev), rc); in link_peers_report()
405 static void unlink_peers(struct usb_port *left, struct usb_port *right) in unlink_peers() argument
409 WARN(right->peer != left || left->peer != right, in unlink_peers()
411 dev_name(&left->dev), dev_name(&right->dev)); in unlink_peers()
420 hs_port = right; in unlink_peers()
422 ss_port = right; in unlink_peers()
429 right->peer = NULL; in unlink_peers()
430 sysfs_remove_link(&right->dev.kobj, "peer"); in unlink_peers()