FreeBSD/sys/dev/drm2/drm_os_freebsd.c
/*
 * drm_probe_helper: called by a driver at the end of its probe
 * method.
 */
called by a driver at the end of its probe
method.
called by a driver at the end of its probe method .
int
drm_probe_helper(device_t kdev, const drm_pci_id_list_t *idlist)
{
	const drm_pci_id_list_t *id_entry;
	int vendor, device;
	vendor = pci_get_vendor(kdev);
	device = pci_get_device(kdev);
	if (pci_get_class(kdev) != PCIC_DISPLAY ||
	    (pci_get_subclass(kdev) != PCIS_DISPLAY_VGA &&
	     pci_get_subclass(kdev) != PCIS_DISPLAY_OTHER))
		return (-ENXIO);
	id_entry = drm_find_description(vendor, device, idlist);
	if (id_entry != NULL) {
		if (device_get_desc(kdev) == NULL) {
			DRM_DEBUG("%s desc: %s\n",
			    device_get_nameunit(kdev), id_entry->name);
			device_set_desc(kdev, id_entry->name);
		}
		return (0);
	}
	return (-ENXIO);
}
int drm_probe_helper ( device_t kdev , const drm_pci_id_list_t * idlist ) { const drm_pci_id_list_t * id_entry ; int vendor , device ; vendor = pci_get_vendor ( kdev ) ; device = pci_get_device ( kdev ) ; if ( pci_get_class ( kdev ) != PCIC_DISPLAY || ( pci_get_subclass ( kdev ) != PCIS_DISPLAY_VGA && pci_get_subclass ( kdev ) != PCIS_DISPLAY_OTHER ) ) return ( - ENXIO ) ; id_entry = drm_find_description ( vendor , device , idlist ) ; if ( id_entry != NULL ) { if ( device_get_desc ( kdev ) == NULL ) { DRM_DEBUG ( " \n " , device_get_nameunit ( kdev ) , id_entry -> name ) ; device_set_desc ( kdev , id_entry -> name ) ; } return ( 0 ) ; } return ( - ENXIO ) ; }
drm_probe_helper: called by a driver at the end of its probe
 method.
drm_probe_helper : called by a driver at the end of its probe method .