Lines Matching refs:collection

118  * Open a collection. The type/usage is pushed on the stack.
123 struct hid_collection *collection;
145 collection = kmalloc(
150 if (collection == NULL) {
151 hid_err(parser->device, "failed to reallocate collection array\n");
154 memcpy(collection, parser->device->collection,
157 memset(collection + parser->device->collection_size, 0,
160 kfree(parser->device->collection);
161 parser->device->collection = collection;
169 collection = parser->device->collection + collection_index;
170 collection->type = type;
171 collection->usage = usage;
172 collection->level = parser->collection_stack_ptr - 1;
173 collection->parent_idx = (collection->level == 0) ? -1 :
174 parser->collection_stack[collection->level - 1];
183 * Close a collection.
189 hid_err(parser->device, "collection stack underflow\n");
197 * Climb up the stack, search for the specified collection type
203 struct hid_collection *collection = parser->device->collection;
208 if (collection[index].type == type)
209 return collection[index].usage;
692 kfree(device->collection);
693 device->collection = NULL;
1070 struct hid_collection *collection;
1078 * but our field may be in a subcollection of that collection.
1083 collection = &hid->collection[usage->collection_index];
1084 while (collection->parent_idx != -1 &&
1085 collection != multiplier_collection)
1086 collection = &hid->collection[collection->parent_idx];
1088 if (collection->parent_idx != -1 ||
1111 * all controls in the collection. If no Logical Collection is
1116 * Thus, search from the current collection upwards until we find a
1117 * logical collection. Then search all fields for that same parent
1118 * collection. Those are the fields the multiplier applies to.
1123 multiplier_collection = &hid->collection[multiplier->usage->collection_index];
1126 multiplier_collection = &hid->collection[multiplier_collection->parent_idx];
1255 device->collection = kcalloc(HID_DEFAULT_NUM_COLLECTIONS,
1257 if (!device->collection) {
1263 device->collection[i].parent_idx = -1;
1283 hid_err(device, "unbalanced collection at end of report description\n");
2009 struct hid_collection *col = &hdev->collection[i];