/** * Calls a device driver specific function to perform any * necessary hardware actions before closing the device. * then call the default close_ocb function. */ int io_close_ocb(resmgr_context_t *ctp, void *reserved, RESMGR_OCB_T *ocb) { int status; IOFUNC_ATTR_T *pattr = ocb->io_ocb.attr; das_func_t *pfunc = &pattr->func; pfunc->das_close(ctp, ocb); return(iofunc_close_ocb_default(ctp, NULL, (iofunc_ocb_t *) ocb)); }
static int devi_close(resmgr_context_t *ctp, void *reserved, RESMGR_OCB_T *ocb) { devi_attr_t *attr = ocb->ocb.attr; iofunc_notify_remove(ctp, attr->notify); remove_ocb(attr, ocb); return (iofunc_close_ocb_default(ctp, reserved, &ocb->ocb)); }