/* Delete URB (previously enqueued) from the device queue  */
int khci_hc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
/* Delete URB (previously enqueued) from the device queue  */
int khci_hc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
{
	struct khci_hcd	*khci = hcd_to_khci(hcd);
	struct khci_urb	*kurb;
	unsigned long	flags;
	int		rv;
	dbg(1, "%s URB:%p(%d),EP:%p,Type:%d\n", __func__, urb, status, urb->ep,
	    usb_endpoint_type(&urb->ep->desc));
	spin_lock_irqsave(&khci->lock, flags);
	rv = usb_hcd_check_unlink_urb(hcd, urb, status);
	if (rv)
		goto out;
	kurb = urb->hcpriv;
	if (kurb) {
		kurb->status = status;
		khci_urb_free(kurb);
	}
out:
	spin_unlock_irqrestore(&khci->lock, flags);
	return rv;
}