Lines Matching refs:list
624 struct list_head *list; in hid_dump_device() local
630 list = report_enum->report_list.next; in hid_dump_device()
631 while (list != &report_enum->report_list) { in hid_dump_device()
632 report = (struct hid_report *) list; in hid_dump_device()
644 list = list->next; in hid_dump_device()
653 struct hid_debug_list *list; in hid_debug_event() local
657 list_for_each_entry(list, &hdev->debug_list, node) in hid_debug_event()
658 kfifo_in(&list->hid_debug_fifo, buf, strlen(buf)); in hid_debug_event()
1023 list_for_each_entry(report, &hid->report_enum[k].report_list, list) { in hid_dump_input_mapping()
1071 struct hid_debug_list *list; in hid_debug_events_open() local
1074 if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) { in hid_debug_events_open()
1079 err = kfifo_alloc(&list->hid_debug_fifo, HID_DEBUG_FIFOSIZE, GFP_KERNEL); in hid_debug_events_open()
1081 kfree(list); in hid_debug_events_open()
1084 list->hdev = (struct hid_device *) inode->i_private; in hid_debug_events_open()
1085 file->private_data = list; in hid_debug_events_open()
1086 mutex_init(&list->read_mutex); in hid_debug_events_open()
1088 spin_lock_irqsave(&list->hdev->debug_list_lock, flags); in hid_debug_events_open()
1089 list_add_tail(&list->node, &list->hdev->debug_list); in hid_debug_events_open()
1090 spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags); in hid_debug_events_open()
1099 struct hid_debug_list *list = file->private_data; in hid_debug_events_read() local
1103 mutex_lock(&list->read_mutex); in hid_debug_events_read()
1104 if (kfifo_is_empty(&list->hid_debug_fifo)) { in hid_debug_events_read()
1105 add_wait_queue(&list->hdev->debug_wait, &wait); in hid_debug_events_read()
1108 while (kfifo_is_empty(&list->hid_debug_fifo)) { in hid_debug_events_read()
1119 if (!list->hdev || !list->hdev->debug) { in hid_debug_events_read()
1131 mutex_unlock(&list->read_mutex); in hid_debug_events_read()
1133 mutex_lock(&list->read_mutex); in hid_debug_events_read()
1138 remove_wait_queue(&list->hdev->debug_wait, &wait); in hid_debug_events_read()
1147 ret = kfifo_to_user(&list->hid_debug_fifo, buffer, count, &copied); in hid_debug_events_read()
1152 mutex_unlock(&list->read_mutex); in hid_debug_events_read()
1158 struct hid_debug_list *list = file->private_data; in hid_debug_events_poll() local
1160 poll_wait(file, &list->hdev->debug_wait, wait); in hid_debug_events_poll()
1161 if (!kfifo_is_empty(&list->hid_debug_fifo)) in hid_debug_events_poll()
1163 if (!list->hdev->debug) in hid_debug_events_poll()
1170 struct hid_debug_list *list = file->private_data; in hid_debug_events_release() local
1173 spin_lock_irqsave(&list->hdev->debug_list_lock, flags); in hid_debug_events_release()
1174 list_del(&list->node); in hid_debug_events_release()
1175 spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags); in hid_debug_events_release()
1176 kfifo_free(&list->hid_debug_fifo); in hid_debug_events_release()
1177 kfree(list); in hid_debug_events_release()