Lines Matching refs:ext_prop
993 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_type_store() local
994 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_type_store()
1008 if ((ext_prop->type == USB_EXT_PROP_BINARY || in ext_prop_type_store()
1009 ext_prop->type == USB_EXT_PROP_LE32 || in ext_prop_type_store()
1010 ext_prop->type == USB_EXT_PROP_BE32) && in ext_prop_type_store()
1014 ext_prop->data_len <<= 1; in ext_prop_type_store()
1015 else if ((ext_prop->type == USB_EXT_PROP_UNICODE || in ext_prop_type_store()
1016 ext_prop->type == USB_EXT_PROP_UNICODE_ENV || in ext_prop_type_store()
1017 ext_prop->type == USB_EXT_PROP_UNICODE_LINK) && in ext_prop_type_store()
1021 ext_prop->data_len >>= 1; in ext_prop_type_store()
1022 ext_prop->type = type; in ext_prop_type_store()
1033 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_show() local
1034 int len = ext_prop->data_len; in ext_prop_data_show()
1036 if (ext_prop->type == USB_EXT_PROP_UNICODE || in ext_prop_data_show()
1037 ext_prop->type == USB_EXT_PROP_UNICODE_ENV || in ext_prop_data_show()
1038 ext_prop->type == USB_EXT_PROP_UNICODE_LINK) in ext_prop_data_show()
1040 memcpy(page, ext_prop->data, len); in ext_prop_data_show()
1048 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_store() local
1049 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_data_store()
1061 kfree(ext_prop->data); in ext_prop_data_store()
1062 ext_prop->data = new_data; in ext_prop_data_store()
1063 desc->ext_prop_len -= ext_prop->data_len; in ext_prop_data_store()
1064 ext_prop->data_len = len; in ext_prop_data_store()
1065 desc->ext_prop_len += ext_prop->data_len; in ext_prop_data_store()
1066 if (ext_prop->type == USB_EXT_PROP_UNICODE || in ext_prop_data_store()
1067 ext_prop->type == USB_EXT_PROP_UNICODE_ENV || in ext_prop_data_store()
1068 ext_prop->type == USB_EXT_PROP_UNICODE_LINK) { in ext_prop_data_store()
1069 desc->ext_prop_len -= ext_prop->data_len; in ext_prop_data_store()
1070 ext_prop->data_len <<= 1; in ext_prop_data_store()
1071 ext_prop->data_len += 2; in ext_prop_data_store()
1072 desc->ext_prop_len += ext_prop->data_len; in ext_prop_data_store()
1090 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in usb_os_desc_ext_prop_release() local
1092 kfree(ext_prop); /* frees a whole chunk */ in usb_os_desc_ext_prop_release()
1103 struct usb_os_desc_ext_prop *ext_prop; in ext_prop_make() local
1109 vla_item(data_chunk, struct usb_os_desc_ext_prop, ext_prop, 1); in ext_prop_make()
1116 ext_prop = vla_ptr(vlabuf, data_chunk, ext_prop); in ext_prop_make()
1124 config_item_init_type_name(&ext_prop->item, name, ext_prop_type); in ext_prop_make()
1126 ext_prop->name = kstrdup(name, GFP_KERNEL); in ext_prop_make()
1127 if (!ext_prop->name) { in ext_prop_make()
1132 ext_prop->name_len = 2 * strlen(ext_prop->name) + 2; in ext_prop_make()
1135 desc->ext_prop_len += ext_prop->name_len; in ext_prop_make()
1136 list_add_tail(&ext_prop->entry, &desc->ext_prop); in ext_prop_make()
1141 return &ext_prop->item; in ext_prop_make()
1146 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_drop() local
1151 list_del(&ext_prop->entry); in ext_prop_drop()
1153 kfree(ext_prop->name); in ext_prop_drop()
1154 desc->ext_prop_len -= (ext_prop->name_len + ext_prop->data_len + 14); in ext_prop_drop()