Lines Matching refs:collection
116 * Open a collection. The type/usage is pushed on the stack.
121 struct hid_collection *collection;
143 collection = kmalloc(
148 if (collection == NULL) {
149 hid_err(parser->device, "failed to reallocate collection array\n");
152 memcpy(collection, parser->device->collection,
155 memset(collection + parser->device->collection_size, 0,
158 kfree(parser->device->collection);
159 parser->device->collection = collection;
167 collection = parser->device->collection + collection_index;
168 collection->type = type;
169 collection->usage = usage;
170 collection->level = parser->collection_stack_ptr - 1;
171 collection->parent_idx = (collection->level == 0) ? -1 :
172 parser->collection_stack[collection->level - 1];
181 * Close a collection.
187 hid_err(parser->device, "collection stack underflow\n");
195 * Climb up the stack, search for the specified collection type
201 struct hid_collection *collection = parser->device->collection;
206 if (collection[index].type == type)
207 return collection[index].usage;
692 kfree(device->collection);
693 device->collection = NULL;
1071 struct hid_collection *collection;
1079 * but our field may be in a subcollection of that collection.
1084 collection = &hid->collection[usage->collection_index];
1085 while (collection->parent_idx != -1 &&
1086 collection != multiplier_collection)
1087 collection = &hid->collection[collection->parent_idx];
1089 if (collection->parent_idx != -1 ||
1112 * all controls in the collection. If no Logical Collection is
1117 * Thus, search from the current collection upwards until we find a
1118 * logical collection. Then search all fields for that same parent
1119 * collection. Those are the fields the multiplier applies to.
1124 multiplier_collection = &hid->collection[multiplier->usage->collection_index];
1127 multiplier_collection = &hid->collection[multiplier_collection->parent_idx];
1257 device->collection = kcalloc(HID_DEFAULT_NUM_COLLECTIONS,
1259 if (!device->collection) {
1265 device->collection[i].parent_idx = -1;
1285 hid_err(device, "unbalanced collection at end of report description\n");
2233 struct hid_collection *col = &hdev->collection[i];