Lines Matching refs:ext_prop
1286 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_type_store() local
1287 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_type_store()
1301 if ((ext_prop->type == USB_EXT_PROP_BINARY || in ext_prop_type_store()
1302 ext_prop->type == USB_EXT_PROP_LE32 || in ext_prop_type_store()
1303 ext_prop->type == USB_EXT_PROP_BE32) && in ext_prop_type_store()
1307 ext_prop->data_len <<= 1; in ext_prop_type_store()
1308 else if ((ext_prop->type == USB_EXT_PROP_UNICODE || in ext_prop_type_store()
1309 ext_prop->type == USB_EXT_PROP_UNICODE_ENV || in ext_prop_type_store()
1310 ext_prop->type == USB_EXT_PROP_UNICODE_LINK) && in ext_prop_type_store()
1314 ext_prop->data_len >>= 1; in ext_prop_type_store()
1315 ext_prop->type = type; in ext_prop_type_store()
1324 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_show() local
1325 int len = ext_prop->data_len; in ext_prop_data_show()
1327 if (ext_prop->type == USB_EXT_PROP_UNICODE || in ext_prop_data_show()
1328 ext_prop->type == USB_EXT_PROP_UNICODE_ENV || in ext_prop_data_show()
1329 ext_prop->type == USB_EXT_PROP_UNICODE_LINK) in ext_prop_data_show()
1331 memcpy(page, ext_prop->data, len); in ext_prop_data_show()
1339 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_store() local
1340 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_data_store()
1352 kfree(ext_prop->data); in ext_prop_data_store()
1353 ext_prop->data = new_data; in ext_prop_data_store()
1354 desc->ext_prop_len -= ext_prop->data_len; in ext_prop_data_store()
1355 ext_prop->data_len = len; in ext_prop_data_store()
1356 desc->ext_prop_len += ext_prop->data_len; in ext_prop_data_store()
1357 if (ext_prop->type == USB_EXT_PROP_UNICODE || in ext_prop_data_store()
1358 ext_prop->type == USB_EXT_PROP_UNICODE_ENV || in ext_prop_data_store()
1359 ext_prop->type == USB_EXT_PROP_UNICODE_LINK) { in ext_prop_data_store()
1360 desc->ext_prop_len -= ext_prop->data_len; in ext_prop_data_store()
1361 ext_prop->data_len <<= 1; in ext_prop_data_store()
1362 ext_prop->data_len += 2; in ext_prop_data_store()
1363 desc->ext_prop_len += ext_prop->data_len; in ext_prop_data_store()
1381 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in usb_os_desc_ext_prop_release() local
1383 kfree(ext_prop); /* frees a whole chunk */ in usb_os_desc_ext_prop_release()
1394 struct usb_os_desc_ext_prop *ext_prop; in ext_prop_make() local
1400 vla_item(data_chunk, struct usb_os_desc_ext_prop, ext_prop, 1); in ext_prop_make()
1407 ext_prop = vla_ptr(vlabuf, data_chunk, ext_prop); in ext_prop_make()
1415 config_item_init_type_name(&ext_prop->item, name, ext_prop_type); in ext_prop_make()
1417 ext_prop->name = kstrdup(name, GFP_KERNEL); in ext_prop_make()
1418 if (!ext_prop->name) { in ext_prop_make()
1423 ext_prop->name_len = 2 * strlen(ext_prop->name) + 2; in ext_prop_make()
1426 desc->ext_prop_len += ext_prop->name_len; in ext_prop_make()
1427 list_add_tail(&ext_prop->entry, &desc->ext_prop); in ext_prop_make()
1432 return &ext_prop->item; in ext_prop_make()
1437 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_drop() local
1442 list_del(&ext_prop->entry); in ext_prop_drop()
1444 kfree(ext_prop->name); in ext_prop_drop()
1445 desc->ext_prop_len -= (ext_prop->name_len + ext_prop->data_len + 14); in ext_prop_drop()