|
|
|
Re: [PATCH v1 2/2] usb: otg: support for multiple transceivers by a single controller | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
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

[Linux Media] [Video for Linux] [Linux Input] [Linux Audio Users] [Photo] [Yosemite News] [Yosemite Photos] [Free Online Dating] [Linux Kernel] [Linux SCSI] [Old Linux USB Devel Archive] [More Archives]
![]() |
![]() |