Lines Matching refs:collection
126 struct hid_collection *collection; in open_collection() local
148 collection = kmalloc( in open_collection()
153 if (collection == NULL) { in open_collection()
157 memcpy(collection, parser->device->collection, in open_collection()
160 memset(collection + parser->device->collection_size, 0, in open_collection()
163 kfree(parser->device->collection); in open_collection()
164 parser->device->collection = collection; in open_collection()
172 collection = parser->device->collection + collection_index; in open_collection()
173 collection->type = type; in open_collection()
174 collection->usage = usage; in open_collection()
175 collection->level = parser->collection_stack_ptr - 1; in open_collection()
176 collection->parent_idx = (collection->level == 0) ? -1 : in open_collection()
177 parser->collection_stack[collection->level - 1]; in open_collection()
206 struct hid_collection *collection = parser->device->collection; in hid_lookup_collection() local
211 if (collection[index].type == type) in hid_lookup_collection()
212 return collection[index].usage; in hid_lookup_collection()
693 kfree(device->collection); in hid_close_report()
694 device->collection = NULL; in hid_close_report()
1064 struct hid_collection *collection; in hid_apply_multiplier_to_field() local
1077 collection = &hid->collection[usage->collection_index]; in hid_apply_multiplier_to_field()
1078 while (collection->parent_idx != -1 && in hid_apply_multiplier_to_field()
1079 collection != multiplier_collection) in hid_apply_multiplier_to_field()
1080 collection = &hid->collection[collection->parent_idx]; in hid_apply_multiplier_to_field()
1082 if (collection->parent_idx != -1 || in hid_apply_multiplier_to_field()
1117 multiplier_collection = &hid->collection[multiplier->usage->collection_index]; in hid_apply_multiplier()
1120 multiplier_collection = &hid->collection[multiplier_collection->parent_idx]; in hid_apply_multiplier()
1248 device->collection = kcalloc(HID_DEFAULT_NUM_COLLECTIONS, in hid_open_report()
1250 if (!device->collection) { in hid_open_report()
2208 struct hid_collection *col = &hdev->collection[i]; in hid_connect()