Lines Matching refs:reader
76 struct roccat_reader *reader = file->private_data; in roccat_read() local
77 struct roccat_device *device = reader->device; in roccat_read()
85 if (reader->cbuf_start == device->cbuf_end) { in roccat_read()
90 while (reader->cbuf_start == device->cbuf_end) { in roccat_read()
118 report = &device->cbuf[reader->cbuf_start]; in roccat_read()
130 reader->cbuf_start = (reader->cbuf_start + 1) % ROCCAT_CBUF_SIZE; in roccat_read()
139 struct roccat_reader *reader = file->private_data; in roccat_poll() local
140 poll_wait(file, &reader->device->wait, wait); in roccat_poll()
141 if (reader->cbuf_start != reader->device->cbuf_end) in roccat_poll()
143 if (!reader->device->exist) in roccat_poll()
151 struct roccat_reader *reader; in roccat_open() local
155 reader = kzalloc(sizeof(struct roccat_reader), GFP_KERNEL); in roccat_open()
156 if (!reader) in roccat_open()
187 reader->device = device; in roccat_open()
189 reader->cbuf_start = device->cbuf_end; in roccat_open()
191 list_add_tail(&reader->node, &device->readers); in roccat_open()
192 file->private_data = reader; in roccat_open()
199 kfree(reader); in roccat_open()
206 struct roccat_reader *reader = file->private_data; in roccat_release() local
219 list_del(&reader->node); in roccat_release()
221 kfree(reader); in roccat_release()
250 struct roccat_reader *reader; in roccat_report_event() local
270 list_for_each_entry(reader, &device->readers, node) { in roccat_report_event()
277 if (reader->cbuf_start == device->cbuf_end) in roccat_report_event()
278 reader->cbuf_start = (reader->cbuf_start + 1) % ROCCAT_CBUF_SIZE; in roccat_report_event()