Lines Matching refs:list

633 	struct list_head *list;  in hid_dump_device()  local
639 list = report_enum->report_list.next; in hid_dump_device()
640 while (list != &report_enum->report_list) { in hid_dump_device()
641 report = (struct hid_report *) list; in hid_dump_device()
653 list = list->next; in hid_dump_device()
663 struct hid_debug_list *list; in hid_debug_event() local
667 list_for_each_entry(list, &hdev->debug_list, node) { in hid_debug_event()
669 list->hid_debug_buf[(list->tail + i) % HID_DEBUG_BUFSIZE] = in hid_debug_event()
671 list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE; in hid_debug_event()
1033 list_for_each_entry(report, &hid->report_enum[k].report_list, list) { in hid_dump_input_mapping()
1081 struct hid_debug_list *list; in hid_debug_events_open() local
1084 if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) { in hid_debug_events_open()
1089 if (!(list->hid_debug_buf = kzalloc(sizeof(char) * HID_DEBUG_BUFSIZE, GFP_KERNEL))) { in hid_debug_events_open()
1091 kfree(list); in hid_debug_events_open()
1094 list->hdev = (struct hid_device *) inode->i_private; in hid_debug_events_open()
1095 file->private_data = list; in hid_debug_events_open()
1096 mutex_init(&list->read_mutex); in hid_debug_events_open()
1098 spin_lock_irqsave(&list->hdev->debug_list_lock, flags); in hid_debug_events_open()
1099 list_add_tail(&list->node, &list->hdev->debug_list); in hid_debug_events_open()
1100 spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags); in hid_debug_events_open()
1109 struct hid_debug_list *list = file->private_data; in hid_debug_events_read() local
1113 mutex_lock(&list->read_mutex); in hid_debug_events_read()
1115 if (list->head == list->tail) { in hid_debug_events_read()
1116 add_wait_queue(&list->hdev->debug_wait, &wait); in hid_debug_events_read()
1119 while (list->head == list->tail) { in hid_debug_events_read()
1129 if (!list->hdev || !list->hdev->debug) { in hid_debug_events_read()
1136 mutex_unlock(&list->read_mutex); in hid_debug_events_read()
1138 mutex_lock(&list->read_mutex); in hid_debug_events_read()
1143 remove_wait_queue(&list->hdev->debug_wait, &wait); in hid_debug_events_read()
1151 if (list->tail == list->head) in hid_debug_events_read()
1153 if (list->tail > list->head) { in hid_debug_events_read()
1154 len = list->tail - list->head; in hid_debug_events_read()
1156 if (copy_to_user(buffer + ret, &list->hid_debug_buf[list->head], len)) { in hid_debug_events_read()
1161 list->head += len; in hid_debug_events_read()
1163 len = HID_DEBUG_BUFSIZE - list->head; in hid_debug_events_read()
1165 if (copy_to_user(buffer, &list->hid_debug_buf[list->head], len)) { in hid_debug_events_read()
1169 list->head = 0; in hid_debug_events_read()
1176 mutex_unlock(&list->read_mutex); in hid_debug_events_read()
1182 struct hid_debug_list *list = file->private_data; in hid_debug_events_poll() local
1184 poll_wait(file, &list->hdev->debug_wait, wait); in hid_debug_events_poll()
1185 if (list->head != list->tail) in hid_debug_events_poll()
1187 if (!list->hdev->debug) in hid_debug_events_poll()
1194 struct hid_debug_list *list = file->private_data; in hid_debug_events_release() local
1197 spin_lock_irqsave(&list->hdev->debug_list_lock, flags); in hid_debug_events_release()
1198 list_del(&list->node); in hid_debug_events_release()
1199 spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags); in hid_debug_events_release()
1200 kfree(list->hid_debug_buf); in hid_debug_events_release()
1201 kfree(list); in hid_debug_events_release()