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()
1170 struct rfkill_int_event *ev, *tmp; in rfkill_fop_open() local
1189 ev = kzalloc(sizeof(*ev), GFP_KERNEL); in rfkill_fop_open()
1190 if (!ev) in rfkill_fop_open()
1193 rfkill_fill_event(&ev->ev, rfkill, RFKILL_OP_ADD); in rfkill_fop_open()
1195 list_add_tail(&ev->list, &data->events); in rfkill_fop_open()
1208 list_for_each_entry_safe(ev, tmp, &data->events, list) in rfkill_fop_open()
1209 kfree(ev); in rfkill_fop_open()
1233 struct rfkill_int_event *ev; in rfkill_fop_read() local
1256 ev = list_first_entry(&data->events, struct rfkill_int_event, in rfkill_fop_read()
1259 sz = min_t(unsigned long, sizeof(ev->ev), count); in rfkill_fop_read()
1262 if (copy_to_user(buf, &ev->ev, sz)) in rfkill_fop_read()
1265 list_del(&ev->list); in rfkill_fop_read()
1266 kfree(ev); in rfkill_fop_read()
1277 struct rfkill_event_ext ev; in rfkill_fop_write() local
1289 count = min(count, sizeof(ev)); in rfkill_fop_write()
1291 if (copy_from_user(&ev, buf, count)) in rfkill_fop_write()
1294 if (ev.type >= NUM_RFKILL_TYPES) in rfkill_fop_write()
1299 switch (ev.op) { in rfkill_fop_write()
1301 rfkill_update_global_state(ev.type, ev.soft); in rfkill_fop_write()
1303 if (rfkill->type == ev.type || in rfkill_fop_write()
1304 ev.type == RFKILL_TYPE_ALL) in rfkill_fop_write()
1305 rfkill_set_block(rfkill, ev.soft); in rfkill_fop_write()
1310 if (rfkill->idx == ev.idx && in rfkill_fop_write()
1311 (rfkill->type == ev.type || in rfkill_fop_write()
1312 ev.type == RFKILL_TYPE_ALL)) in rfkill_fop_write()
1313 rfkill_set_block(rfkill, ev.soft); in rfkill_fop_write()
1329 struct rfkill_int_event *ev, *tmp; in rfkill_fop_release() local
1336 list_for_each_entry_safe(ev, tmp, &data->events, list) in rfkill_fop_release()
1337 kfree(ev); in rfkill_fop_release()