Lines Matching refs:length
13 static int copy_to_unicode(char *buff, int length, const char *str) in copy_to_unicode() argument
18 if (length < 2) in copy_to_unicode()
21 for (ptr = 2, i = 0; ptr + 1 < length && *str; i++, ptr += 2) { in copy_to_unicode()
31 char *buff, int length) in usb_emul_get_string() argument
46 return copy_to_unicode(buff, length, ptr->s); in usb_emul_get_string()
79 void *buffer, int length) in usb_emul_get_descriptor() argument
89 length); in usb_emul_get_descriptor()
98 for (upto = 0; *ptr && upto < length; ptr++, upto += todo) { in usb_emul_get_descriptor()
99 todo = min(length - upto, (int)(*ptr)->bLength); in usb_emul_get_descriptor()
104 return upto ? upto : length ? -EIO : 0; in usb_emul_get_descriptor()
178 unsigned long pipe, void *buffer, int length, in usb_emul_control() argument
194 buffer, length); in usb_emul_control()
200 return ops->control(emul, udev, pipe, buffer, length, in usb_emul_control()
223 return ops->control(emul, udev, pipe, buffer, length, in usb_emul_control()
233 unsigned long pipe, void *buffer, int length) in usb_emul_bulk() argument
245 return ops->bulk(emul, udev, pipe, buffer, length); in usb_emul_bulk()
249 unsigned long pipe, void *buffer, int length, int interval, in usb_emul_int() argument
258 return ops->interrupt(emul, udev, pipe, buffer, length, interval, in usb_emul_int()