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