/* ep0_get_status - fill in URB data with appropriate status @device: @urb: @index: @requesttype:  */
static int ep0_get_status(struct usb_device_instance *device, struct urb *urb, int index, int requesttype)
/* ep0_get_status - fill in URB data with appropriate status @device: @urb: @index: @requesttype:  */
static int ep0_get_status(struct usb_device_instance *device, struct urb *urb, int index, int requesttype)
{
	char *cp;
	urb->actual_length = 2;
	cp = (char*)urb->buffer;
	cp[0] = cp[1] = 0;
	switch (requesttype) {
	case USB_REQ_RECIPIENT_DEVICE:
		cp[0] = USB_STATUS_SELFPOWERED;
		break;
	case USB_REQ_RECIPIENT_INTERFACE:
		break;
	case USB_REQ_RECIPIENT_ENDPOINT:
		cp[0] = usbd_endpoint_halted (device, index);
		break;
	case USB_REQ_RECIPIENT_OTHER:
		urb->actual_length = 0;
	default:
		break;
	}
	dbg_ep0 (2, "%02x %02x", cp[0], cp[1]);
	return 0;
}