/* look for an input transfer endpoint in an alternate setting  */
static struct usb_host_endpoint* alt_xfer(struct usb_host_interface *alt, int xfer)
/* look for an input transfer endpoint in an alternate setting  */
static struct usb_host_endpoint* alt_xfer(struct usb_host_interface *alt, int xfer)
{
	struct usb_host_endpoint *ep;
	int i, attr;
	for (i = 0; i < alt->desc.bNumEndpoints; i++) {
		ep = &alt->endpoint[i];
		attr = ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
		if (attr == xfer
		    && ep->desc.wMaxPacketSize != 0)
			return ep;
	}
	return NULL;
}