Lines Matching refs:lep
467 handle_event_add(ldi_event_t *lep) in handle_event_add() argument
469 struct ldi_handle *lhp = lep->le_lhp; in handle_event_add()
475 lhp->lh_events = lep; in handle_event_add()
480 lep->le_next = lhp->lh_events; in handle_event_add()
481 lhp->lh_events->le_prev = lep; in handle_event_add()
482 lhp->lh_events = lep; in handle_event_add()
487 handle_event_remove(ldi_event_t *lep) in handle_event_remove() argument
489 struct ldi_handle *lhp = lep->le_lhp; in handle_event_remove()
494 if (lep->le_prev) in handle_event_remove()
495 lep->le_prev->le_next = lep->le_next; in handle_event_remove()
496 if (lep->le_next) in handle_event_remove()
497 lep->le_next->le_prev = lep->le_prev; in handle_event_remove()
498 if (lhp->lh_events == lep) in handle_event_remove()
499 lhp->lh_events = lep->le_next; in handle_event_remove()
508 ldi_event_t *lep = (ldi_event_t *)arg; in i_ldi_callback() local
510 ASSERT(lep != NULL); in i_ldi_callback()
514 (void *)dip, (void *)event_cookie, (void *)lep)); in i_ldi_callback()
516 lep->le_handler(lep->le_lhp, event_cookie, lep->le_arg, bus_impldata); in i_ldi_callback()
1675 struct ldi_event *lep; in ldi_close() local
1702 while ((lep = handlep->lh_events) != NULL) { in ldi_close()
1704 (void) ldi_remove_event_handler(lh, (ldi_callback_id_t)lep); in ldi_close()
2818 struct ldi_event *lep; in ldi_add_event_handler() local
2842 lep = kmem_zalloc(sizeof (struct ldi_event), KM_SLEEP); in ldi_add_event_handler()
2843 lep->le_lhp = handlep; in ldi_add_event_handler()
2844 lep->le_arg = arg; in ldi_add_event_handler()
2845 lep->le_handler = handler; in ldi_add_event_handler()
2848 (void *)lep, &lep->le_id)) != DDI_SUCCESS) { in ldi_add_event_handler()
2852 kmem_free(lep, sizeof (struct ldi_event)); in ldi_add_event_handler()
2856 *id = (ldi_callback_id_t)lep; in ldi_add_event_handler()
2860 (void *)dip, (void *)ec, (void *)lep, (void *)id)); in ldi_add_event_handler()
2862 handle_event_add(lep); in ldi_add_event_handler()
2870 ldi_event_t *lep = (ldi_event_t *)id; in ldi_remove_event_handler() local
2878 if ((res = ddi_remove_event_handler(lep->le_id)) in ldi_remove_event_handler()
2885 handle_event_remove(lep); in ldi_remove_event_handler()
2886 kmem_free(lep, sizeof (struct ldi_event)); in ldi_remove_event_handler()