Lines Matching refs:ugd
109 static int ugen_get_iface_driver(struct usb_fifo *f, struct usb_gen_descriptor *ugd);
667 ugen_get_cdesc(struct usb_fifo *f, struct usb_gen_descriptor *ugd)
677 if (ugd->ugd_data == NULL) {
681 if ((ugd->ugd_config_index == USB_UNCONFIG_INDEX) ||
682 (ugd->ugd_config_index == udev->curr_config_index)) {
691 NULL, &cdesc, ugd->ugd_config_index)) {
702 if (len > ugd->ugd_maxlen) {
703 len = ugd->ugd_maxlen;
707 ugd->ugd_actlen = len;
708 ugd->ugd_offset = 0;
710 error = copyout(cdesc, ugd->ugd_data, len);
723 ugen_get_sdesc(struct usb_fifo *f, struct usb_gen_descriptor *ugd)
733 size, ugd->ugd_lang_id, ugd->ugd_string_index)) {
740 if (size > ugd->ugd_maxlen) {
741 size = ugd->ugd_maxlen;
743 ugd->ugd_actlen = size;
744 ugd->ugd_offset = 0;
746 error = copyout(ptr, ugd->ugd_data, size);
761 ugen_get_iface_driver(struct usb_fifo *f, struct usb_gen_descriptor *ugd)
774 if ((ugd->ugd_data == NULL) || (ugd->ugd_maxlen == 0)) {
779 iface = usbd_get_iface(udev, ugd->ugd_iface_index);
795 maxlen = ugd->ugd_maxlen - 1;
801 ugd->ugd_actlen = len + 1;
804 error = copyout(buf, ugd->ugd_data, ugd->ugd_actlen);
807 error = copyout("", ugd->ugd_data, 1);