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()
1692 struct ldi_event *lep; in ldi_close() local
1719 while ((lep = handlep->lh_events) != NULL) { in ldi_close()
1721 (void) ldi_remove_event_handler(lh, (ldi_callback_id_t)lep); in ldi_close()
2835 struct ldi_event *lep; in ldi_add_event_handler() local
2859 lep = kmem_zalloc(sizeof (struct ldi_event), KM_SLEEP); in ldi_add_event_handler()
2860 lep->le_lhp = handlep; in ldi_add_event_handler()
2861 lep->le_arg = arg; in ldi_add_event_handler()
2862 lep->le_handler = handler; in ldi_add_event_handler()
2865 (void *)lep, &lep->le_id)) != DDI_SUCCESS) { in ldi_add_event_handler()
2869 kmem_free(lep, sizeof (struct ldi_event)); in ldi_add_event_handler()
2873 *id = (ldi_callback_id_t)lep; in ldi_add_event_handler()
2877 (void *)dip, (void *)ec, (void *)lep, (void *)id)); in ldi_add_event_handler()
2879 handle_event_add(lep); in ldi_add_event_handler()
2887 ldi_event_t *lep = (ldi_event_t *)id; in ldi_remove_event_handler() local
2895 if ((res = ddi_remove_event_handler(lep->le_id)) in ldi_remove_event_handler()
2902 handle_event_remove(lep); in ldi_remove_event_handler()
2903 kmem_free(lep, sizeof (struct ldi_event)); in ldi_remove_event_handler()