Lines Matching refs:dv
804 struct device *dv = NULL; local
807 dv = (struct device *)(cd->cd_devs[unit]);
809 if (!dv)
812 if (!(dv->dv_flags & DVF_ACTIVE))
813 dv = NULL;
815 if (dv != NULL)
816 device_ref(dv);
818 return (dv);
829 device_ref(dv) in device_ref() argument
830 struct device *dv; in device_ref()
832 dv->dv_ref++;
844 device_unref(dv) in device_unref() argument
845 struct device *dv; in device_unref()
847 dv->dv_ref--;
848 if (dv->dv_ref == 0) {
849 if (dv->dv_cfdata->cf_attach->ca_zeroref)
850 (*dv->dv_cfdata->cf_attach->ca_zeroref)(dv);
852 free(dv, M_DEVBUF);