Lines Matching refs:ext_prop

955 	struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item);  in ext_prop_type_store()  local
956 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_type_store()
970 if ((ext_prop->type == USB_EXT_PROP_BINARY || in ext_prop_type_store()
971 ext_prop->type == USB_EXT_PROP_LE32 || in ext_prop_type_store()
972 ext_prop->type == USB_EXT_PROP_BE32) && in ext_prop_type_store()
976 ext_prop->data_len <<= 1; in ext_prop_type_store()
977 else if ((ext_prop->type == USB_EXT_PROP_UNICODE || in ext_prop_type_store()
978 ext_prop->type == USB_EXT_PROP_UNICODE_ENV || in ext_prop_type_store()
979 ext_prop->type == USB_EXT_PROP_UNICODE_LINK) && in ext_prop_type_store()
983 ext_prop->data_len >>= 1; in ext_prop_type_store()
984 ext_prop->type = type; in ext_prop_type_store()
995 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_show() local
996 int len = ext_prop->data_len; in ext_prop_data_show()
998 if (ext_prop->type == USB_EXT_PROP_UNICODE || in ext_prop_data_show()
999 ext_prop->type == USB_EXT_PROP_UNICODE_ENV || in ext_prop_data_show()
1000 ext_prop->type == USB_EXT_PROP_UNICODE_LINK) in ext_prop_data_show()
1002 memcpy(page, ext_prop->data, len); in ext_prop_data_show()
1010 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_store() local
1011 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_data_store()
1023 kfree(ext_prop->data); in ext_prop_data_store()
1024 ext_prop->data = new_data; in ext_prop_data_store()
1025 desc->ext_prop_len -= ext_prop->data_len; in ext_prop_data_store()
1026 ext_prop->data_len = len; in ext_prop_data_store()
1027 desc->ext_prop_len += ext_prop->data_len; in ext_prop_data_store()
1028 if (ext_prop->type == USB_EXT_PROP_UNICODE || in ext_prop_data_store()
1029 ext_prop->type == USB_EXT_PROP_UNICODE_ENV || in ext_prop_data_store()
1030 ext_prop->type == USB_EXT_PROP_UNICODE_LINK) { in ext_prop_data_store()
1031 desc->ext_prop_len -= ext_prop->data_len; in ext_prop_data_store()
1032 ext_prop->data_len <<= 1; in ext_prop_data_store()
1033 ext_prop->data_len += 2; in ext_prop_data_store()
1034 desc->ext_prop_len += ext_prop->data_len; in ext_prop_data_store()
1052 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in usb_os_desc_ext_prop_release() local
1054 kfree(ext_prop); /* frees a whole chunk */ in usb_os_desc_ext_prop_release()
1065 struct usb_os_desc_ext_prop *ext_prop; in ext_prop_make() local
1071 vla_item(data_chunk, struct usb_os_desc_ext_prop, ext_prop, 1); in ext_prop_make()
1078 ext_prop = vla_ptr(vlabuf, data_chunk, ext_prop); in ext_prop_make()
1086 config_item_init_type_name(&ext_prop->item, name, ext_prop_type); in ext_prop_make()
1088 ext_prop->name = kstrdup(name, GFP_KERNEL); in ext_prop_make()
1089 if (!ext_prop->name) { in ext_prop_make()
1094 ext_prop->name_len = 2 * strlen(ext_prop->name) + 2; in ext_prop_make()
1097 desc->ext_prop_len += ext_prop->name_len; in ext_prop_make()
1098 list_add_tail(&ext_prop->entry, &desc->ext_prop); in ext_prop_make()
1103 return &ext_prop->item; in ext_prop_make()
1108 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_drop() local
1113 list_del(&ext_prop->entry); in ext_prop_drop()
1115 kfree(ext_prop->name); in ext_prop_drop()
1116 desc->ext_prop_len -= (ext_prop->name_len + ext_prop->data_len + 14); in ext_prop_drop()