Lines Matching defs:buf
90 * @buf: at least 256 bytes
104 usb_gadget_get_string (struct usb_gadget_strings *table, int id, u8 *buf)
111 buf [0] = 4;
112 buf [1] = USB_DT_STRING;
113 buf [2] = (u8) table->language;
114 buf [3] = (u8) (table->language >> 8);
127 memset (buf + 2, 0, 2 * len); /* zero all the bytes */
128 len = utf8_to_utf16le(s->s, (__le16 *)&buf[2], len);
131 buf [0] = (len + 1) * 2;
132 buf [1] = USB_DT_STRING;
133 return buf [0];