Lines Matching refs:buf
19 * @buf: at least 256 bytes
33 usb_gadget_get_string(struct usb_gadget_strings *table, int id, u8 *buf)
43 buf[0] = 4;
44 buf[1] = USB_DT_STRING;
45 buf[2] = (u8) table->language;
46 buf[3] = (u8) (table->language >> 8);
59 memset(buf + 2, 0, 2 * len); /* zero all the bytes */
60 len = utf8_to_utf16le(s->s, (__le16 *)&buf[2], len);
63 buf[0] = (len + 1) * 2;
64 buf[1] = USB_DT_STRING;
65 return buf[0];