Lines Matching refs:ev

73 	struct rfkill_event_ext	ev;  member
258 static void rfkill_fill_event(struct rfkill_event_ext *ev, in rfkill_fill_event() argument
264 ev->idx = rfkill->idx; in rfkill_fill_event()
265 ev->type = rfkill->type; in rfkill_fill_event()
266 ev->op = op; in rfkill_fill_event()
269 ev->hard = !!(rfkill->state & RFKILL_BLOCK_HW); in rfkill_fill_event()
270 ev->soft = !!(rfkill->state & (RFKILL_BLOCK_SW | in rfkill_fill_event()
272 ev->hard_block_reasons = rfkill->hard_block_reasons; in rfkill_fill_event()
279 struct rfkill_int_event *ev; in rfkill_send_events() local
282 ev = kzalloc(sizeof(*ev), GFP_KERNEL); in rfkill_send_events()
283 if (!ev) in rfkill_send_events()
285 rfkill_fill_event(&ev->ev, rfkill, op); in rfkill_send_events()
287 list_add_tail(&ev->list, &data->events); in rfkill_send_events()
1166 struct rfkill_int_event *ev, *tmp; in rfkill_fop_open() local
1185 ev = kzalloc(sizeof(*ev), GFP_KERNEL); in rfkill_fop_open()
1186 if (!ev) in rfkill_fop_open()
1189 rfkill_fill_event(&ev->ev, rfkill, RFKILL_OP_ADD); in rfkill_fop_open()
1191 list_add_tail(&ev->list, &data->events); in rfkill_fop_open()
1204 list_for_each_entry_safe(ev, tmp, &data->events, list) in rfkill_fop_open()
1205 kfree(ev); in rfkill_fop_open()
1229 struct rfkill_int_event *ev; in rfkill_fop_read() local
1252 ev = list_first_entry(&data->events, struct rfkill_int_event, in rfkill_fop_read()
1255 sz = min_t(unsigned long, sizeof(ev->ev), count); in rfkill_fop_read()
1258 if (copy_to_user(buf, &ev->ev, sz)) in rfkill_fop_read()
1261 list_del(&ev->list); in rfkill_fop_read()
1262 kfree(ev); in rfkill_fop_read()
1273 struct rfkill_event_ext ev; in rfkill_fop_write() local
1285 count = min(count, sizeof(ev)); in rfkill_fop_write()
1287 if (copy_from_user(&ev, buf, count)) in rfkill_fop_write()
1290 if (ev.type >= NUM_RFKILL_TYPES) in rfkill_fop_write()
1295 switch (ev.op) { in rfkill_fop_write()
1297 rfkill_update_global_state(ev.type, ev.soft); in rfkill_fop_write()
1299 if (rfkill->type == ev.type || in rfkill_fop_write()
1300 ev.type == RFKILL_TYPE_ALL) in rfkill_fop_write()
1301 rfkill_set_block(rfkill, ev.soft); in rfkill_fop_write()
1306 if (rfkill->idx == ev.idx && in rfkill_fop_write()
1307 (rfkill->type == ev.type || in rfkill_fop_write()
1308 ev.type == RFKILL_TYPE_ALL)) in rfkill_fop_write()
1309 rfkill_set_block(rfkill, ev.soft); in rfkill_fop_write()
1325 struct rfkill_int_event *ev, *tmp; in rfkill_fop_release() local
1332 list_for_each_entry_safe(ev, tmp, &data->events, list) in rfkill_fop_release()
1333 kfree(ev); in rfkill_fop_release()