• Home
  • Raw
  • Download

Lines Matching refs:ev

83 	struct rfkill_event	ev;  member
194 static void rfkill_fill_event(struct rfkill_event *ev, struct rfkill *rfkill, in rfkill_fill_event() argument
199 ev->idx = rfkill->idx; in rfkill_fill_event()
200 ev->type = rfkill->type; in rfkill_fill_event()
201 ev->op = op; in rfkill_fill_event()
204 ev->hard = !!(rfkill->state & RFKILL_BLOCK_HW); in rfkill_fill_event()
205 ev->soft = !!(rfkill->state & (RFKILL_BLOCK_SW | in rfkill_fill_event()
213 struct rfkill_int_event *ev; in rfkill_send_events() local
216 ev = kzalloc(sizeof(*ev), GFP_KERNEL); in rfkill_send_events()
217 if (!ev) in rfkill_send_events()
219 rfkill_fill_event(&ev->ev, rfkill, op); in rfkill_send_events()
221 list_add_tail(&ev->list, &data->events); in rfkill_send_events()
1038 struct rfkill_int_event *ev, *tmp; in rfkill_fop_open() local
1056 ev = kzalloc(sizeof(*ev), GFP_KERNEL); in rfkill_fop_open()
1057 if (!ev) in rfkill_fop_open()
1059 rfkill_fill_event(&ev->ev, rfkill, RFKILL_OP_ADD); in rfkill_fop_open()
1060 list_add_tail(&ev->list, &data->events); in rfkill_fop_open()
1074 list_for_each_entry_safe(ev, tmp, &data->events, list) in rfkill_fop_open()
1075 kfree(ev); in rfkill_fop_open()
1110 struct rfkill_int_event *ev; in rfkill_fop_read() local
1130 ev = list_first_entry(&data->events, struct rfkill_int_event, in rfkill_fop_read()
1133 sz = min_t(unsigned long, sizeof(ev->ev), count); in rfkill_fop_read()
1135 if (copy_to_user(buf, &ev->ev, sz)) in rfkill_fop_read()
1138 list_del(&ev->list); in rfkill_fop_read()
1139 kfree(ev); in rfkill_fop_read()
1149 struct rfkill_event ev; in rfkill_fop_write() local
1160 count = min(count, sizeof(ev)); in rfkill_fop_write()
1161 if (copy_from_user(&ev, buf, count)) in rfkill_fop_write()
1164 if (ev.op != RFKILL_OP_CHANGE && ev.op != RFKILL_OP_CHANGE_ALL) in rfkill_fop_write()
1167 if (ev.type >= NUM_RFKILL_TYPES) in rfkill_fop_write()
1172 if (ev.op == RFKILL_OP_CHANGE_ALL) { in rfkill_fop_write()
1173 if (ev.type == RFKILL_TYPE_ALL) { in rfkill_fop_write()
1176 rfkill_global_states[i].cur = ev.soft; in rfkill_fop_write()
1178 rfkill_global_states[ev.type].cur = ev.soft; in rfkill_fop_write()
1183 if (rfkill->idx != ev.idx && ev.op != RFKILL_OP_CHANGE_ALL) in rfkill_fop_write()
1186 if (rfkill->type != ev.type && ev.type != RFKILL_TYPE_ALL) in rfkill_fop_write()
1189 rfkill_set_block(rfkill, ev.soft); in rfkill_fop_write()
1199 struct rfkill_int_event *ev, *tmp; in rfkill_fop_release() local
1206 list_for_each_entry_safe(ev, tmp, &data->events, list) in rfkill_fop_release()
1207 kfree(ev); in rfkill_fop_release()