set_loopback_config (struct zero_dev *dev, int gfp_flags) 
set_loopback_config (struct zero_dev *dev, unsigned gfp_flags) 
set_loopback_config (struct zero_dev *dev, int gfp_flags){	int			result = 0;	struct usb_ep		*ep;	struct usb_gadget	*gadget = dev->gadget;	gadget_for_each_ep (ep, gadget) {		const struct usb_endpoint_descriptor	*d;		/* one endpoint writes data back IN to the host */		if (strcmp (ep->name, EP_IN_NAME) == 0) {			d = ep_desc (gadget, &hs_source_desc, &fs_source_desc);			result = usb_ep_enable (ep, d);			if (result == 0) {				ep->driver_data = dev;				dev->in_ep = ep;				continue;			}		/* one endpoint just reads OUT packets */		} else if (strcmp (ep->name, EP_OUT_NAME) == 0) {			d = ep_desc (gadget, &hs_sink_desc, &fs_sink_desc);			result = usb_ep_enable (ep, d);			if (result == 0) {				ep->driver_data = dev;				dev->out_ep = ep;				continue;			}		/* ignore any other endpoints */		} else			continue;		/* stop on error */		ERROR (dev, "can't enable %s, result %d\n", ep->name, result);		break;	}	/* allocate a bunch of read buffers and queue them all at once.	 * we buffer at most 'qlen' transfers; fewer if any need more	 * than 'buflen' bytes each.	 */	if (result == 0) {		struct usb_request	*req;		unsigned		i;		ep = dev->out_ep;		for (i = 0; i < qlen && result == 0; i++) {			req = alloc_ep_req (ep, buflen);			if (req) {				req->complete = loopback_complete;				result = usb_ep_queue (ep, req, GFP_ATOMIC);				if (result)					DBG (dev, "%s queue req --> %d\n",							ep->name, result);			} else				result = -ENOMEM;		}	}	if (result == 0)		DBG (dev, "qlen %d, buflen %d\n", qlen, buflen);	/* caller is responsible for cleanup on error */	return result;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/5db539e49fc7471e23bf3c94ca304f008cb7b7f3/zero.c/buggy/drivers/usb/gadget/zero.c