Felipe Balbi <balbi@xxxxxx> writes: > static struct usb_phy * __usb_find_phy(struct list_head *list, > enum usb_phy_type type) > { > struct usb_phy *phy = NULL; > > list_for_each_entry(phy, list, head) { > if (phy->type != type) > continue; > > return phy; > } > > return ERR_PTR(-ENODEV); > } > > then usb_get_phy() would look something like: Actually, since you only permit one transceiver of each type (which makes the total of 2), can't it simply be an array indexed by enum usb_phy_type? Since this code is an interim solution anyway (until we have proper multiphy support), it would be much simpler like that. Regards, -- Alex -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html