sys/bus/u4b/usb_dev.c
/*------------------------------------------------------------------------*
 *	usb_usb_ref_device
 *
 * This function is used to upgrade an USB reference to include the
 * USB device reference on a USB location.
 *
 * Return values:
 *  0: Success, refcount incremented on the given USB device.
 *  Else: Failure.
 *------------------------------------------------------------------------*/
usb_usb_ref_device
This function is used to upgrade an USB reference to include the
USB device reference on a USB location.

Return values:
0: Success, refcount incremented on the given USB device.
Else: Failure.
usb_usb_ref_device This function is used to upgrade an USB reference to include the USB device reference on a USB location . Return values : 0 : Success refcount incremented on the given USB device . Else : Failure .
static usb_error_t
usb_usb_ref_device(struct usb_cdev_privdata *cpd,
    struct usb_cdev_refdata *crd)
{
	if (crd->is_uref)
		return (0);		
	usb_unref_device(cpd, crd);
	return (usb_ref_device(cpd, crd, 1 ));
}
static usb_error_t usb_usb_ref_device ( struct usb_cdev_privdata * cpd , struct usb_cdev_refdata * crd ) { if ( crd -> is_uref ) return ( 0 ) ; usb_unref_device ( cpd , crd ) ; return ( usb_ref_device ( cpd , crd , 1 ) ) ; }
usb_usb_ref_device
 This function is used to upgrade an USB reference to include the
 USB device reference on a USB location.
usb_usb_ref_device This function is used to upgrade an USB reference to include the USB device reference on a USB location .
/*
	 * Check if we already got an USB reference on this location:
	 */ /* success */ /*
	 * To avoid deadlock at detach we need to drop the FIFO ref
	 * and re-acquire a new ref!
	 */ /* need uref */