Lines Matching defs:ev

81 	struct rfkill_event	ev;
192 static void rfkill_fill_event(struct rfkill_event *ev, struct rfkill *rfkill,
197 ev->idx = rfkill->idx;
198 ev->type = rfkill->type;
199 ev->op = op;
202 ev->hard = !!(rfkill->state & RFKILL_BLOCK_HW);
203 ev->soft = !!(rfkill->state & (RFKILL_BLOCK_SW |
211 struct rfkill_int_event *ev;
214 ev = kzalloc(sizeof(*ev), GFP_KERNEL);
215 if (!ev)
217 rfkill_fill_event(&ev->ev, rfkill, op);
219 list_add_tail(&ev->list, &data->events);
1031 struct rfkill_int_event *ev, *tmp;
1049 ev = kzalloc(sizeof(*ev), GFP_KERNEL);
1050 if (!ev)
1052 rfkill_fill_event(&ev->ev, rfkill, RFKILL_OP_ADD);
1053 list_add_tail(&ev->list, &data->events);
1067 list_for_each_entry_safe(ev, tmp, &data->events, list)
1068 kfree(ev);
1103 struct rfkill_int_event *ev;
1123 ev = list_first_entry(&data->events, struct rfkill_int_event,
1126 sz = min_t(unsigned long, sizeof(ev->ev), count);
1128 if (copy_to_user(buf, &ev->ev, sz))
1131 list_del(&ev->list);
1132 kfree(ev);
1142 struct rfkill_event ev;
1149 * Copy as much data as we can accept into our 'ev' buffer,
1153 count = min(count, sizeof(ev));
1154 if (copy_from_user(&ev, buf, count))
1157 if (ev.op != RFKILL_OP_CHANGE && ev.op != RFKILL_OP_CHANGE_ALL)
1160 if (ev.type >= NUM_RFKILL_TYPES)
1165 if (ev.op == RFKILL_OP_CHANGE_ALL) {
1166 if (ev.type == RFKILL_TYPE_ALL) {
1169 rfkill_global_states[i].cur = ev.soft;
1171 rfkill_global_states[ev.type].cur = ev.soft;
1176 if (rfkill->idx != ev.idx && ev.op != RFKILL_OP_CHANGE_ALL)
1179 if (rfkill->type != ev.type && ev.type != RFKILL_TYPE_ALL)
1182 rfkill_set_block(rfkill, ev.soft);
1192 struct rfkill_int_event *ev, *tmp;
1199 list_for_each_entry_safe(ev, tmp, &data->events, list)
1200 kfree(ev);