/* s3c_hsotg_ep_dequeue - dequeue given endpoint @ep: The endpoint to dequeue. @req: The request to be removed from a queue.  */
static int s3c_hsotg_ep_dequeue(struct usb_ep *ep, struct usb_request *req)
/* s3c_hsotg_ep_dequeue - dequeue given endpoint @ep: The endpoint to dequeue. @req: The request to be removed from a queue.  */
static int s3c_hsotg_ep_dequeue(struct usb_ep *ep, struct usb_request *req)
{
	struct s3c_hsotg_req *hs_req = our_req(req);
	struct s3c_hsotg_ep *hs_ep = our_ep(ep);
	struct s3c_hsotg *hs = hs_ep->parent;
	unsigned long flags;
	dev_info(hs->dev, "ep_dequeue(%p,%p)\n", ep, req);
	spin_lock_irqsave(&hs->lock, flags);
	if (!on_list(hs_ep, hs_req)) {
		spin_unlock_irqrestore(&hs->lock, flags);
		return -EINVAL;
	}
	s3c_hsotg_complete_request(hs, hs_ep, hs_req, -ECONNRESET);
	spin_unlock_irqrestore(&hs->lock, flags);
	return 0;
}