• Home
  • Raw
  • Download

Lines Matching refs:data

65 	void			*data;  member
212 struct rfkill_data *data; in rfkill_send_events() local
215 list_for_each_entry(data, &rfkill_fds, list) { in rfkill_send_events()
220 mutex_lock(&data->mtx); in rfkill_send_events()
221 list_add_tail(&ev->list, &data->events); in rfkill_send_events()
222 mutex_unlock(&data->mtx); in rfkill_send_events()
223 wake_up_interruptible(&data->read_wait); in rfkill_send_events()
285 rfkill->ops->query(rfkill, rfkill->data); in rfkill_set_block()
303 err = rfkill->ops->set_block(rfkill->data, blocked); in rfkill_set_block()
887 rfkill->data = ops_data; in rfkill_alloc()
909 rfkill->ops->poll(rfkill, rfkill->data); in rfkill_poll()
1036 struct rfkill_data *data; in rfkill_fop_open() local
1040 data = kzalloc(sizeof(*data), GFP_KERNEL); in rfkill_fop_open()
1041 if (!data) in rfkill_fop_open()
1044 INIT_LIST_HEAD(&data->events); in rfkill_fop_open()
1045 mutex_init(&data->mtx); in rfkill_fop_open()
1046 init_waitqueue_head(&data->read_wait); in rfkill_fop_open()
1049 mutex_lock(&data->mtx); in rfkill_fop_open()
1060 list_add_tail(&ev->list, &data->events); in rfkill_fop_open()
1062 list_add(&data->list, &rfkill_fds); in rfkill_fop_open()
1063 mutex_unlock(&data->mtx); in rfkill_fop_open()
1066 file->private_data = data; in rfkill_fop_open()
1071 mutex_unlock(&data->mtx); in rfkill_fop_open()
1073 mutex_destroy(&data->mtx); in rfkill_fop_open()
1074 list_for_each_entry_safe(ev, tmp, &data->events, list) in rfkill_fop_open()
1076 kfree(data); in rfkill_fop_open()
1082 struct rfkill_data *data = file->private_data; in rfkill_fop_poll() local
1085 poll_wait(file, &data->read_wait, wait); in rfkill_fop_poll()
1087 mutex_lock(&data->mtx); in rfkill_fop_poll()
1088 if (!list_empty(&data->events)) in rfkill_fop_poll()
1090 mutex_unlock(&data->mtx); in rfkill_fop_poll()
1095 static bool rfkill_readable(struct rfkill_data *data) in rfkill_readable() argument
1099 mutex_lock(&data->mtx); in rfkill_readable()
1100 r = !list_empty(&data->events); in rfkill_readable()
1101 mutex_unlock(&data->mtx); in rfkill_readable()
1109 struct rfkill_data *data = file->private_data; in rfkill_fop_read() local
1114 mutex_lock(&data->mtx); in rfkill_fop_read()
1116 while (list_empty(&data->events)) { in rfkill_fop_read()
1121 mutex_unlock(&data->mtx); in rfkill_fop_read()
1122 ret = wait_event_interruptible(data->read_wait, in rfkill_fop_read()
1123 rfkill_readable(data)); in rfkill_fop_read()
1124 mutex_lock(&data->mtx); in rfkill_fop_read()
1130 ev = list_first_entry(&data->events, struct rfkill_int_event, in rfkill_fop_read()
1141 mutex_unlock(&data->mtx); in rfkill_fop_read()
1198 struct rfkill_data *data = file->private_data; in rfkill_fop_release() local
1202 list_del(&data->list); in rfkill_fop_release()
1205 mutex_destroy(&data->mtx); in rfkill_fop_release()
1206 list_for_each_entry_safe(ev, tmp, &data->events, list) in rfkill_fop_release()
1210 if (data->input_handler) in rfkill_fop_release()
1215 kfree(data); in rfkill_fop_release()
1224 struct rfkill_data *data = file->private_data; in rfkill_fop_ioctl() local
1232 mutex_lock(&data->mtx); in rfkill_fop_ioctl()
1234 if (!data->input_handler) { in rfkill_fop_ioctl()
1237 data->input_handler = true; in rfkill_fop_ioctl()
1240 mutex_unlock(&data->mtx); in rfkill_fop_ioctl()