FreeBSD/sys/dev/bhnd/bhndb/bhndb_pci.c
/** 
 * Default bhndb_pci implementation of device_probe().
 * 
 * Verifies that the parent is a PCI/PCIe device.
 */


Verifies that the parent is a PCI/PCIe device.
Verifies that the parent is a PCI / PCIe device .
static int
bhndb_pci_probe(device_t dev)
{
	device_t	parent;
	devclass_t	parent_bus;
	devclass_t	pci;
	pci = devclass_find("pci");
	parent = device_get_parent(dev);
	parent_bus = device_get_devclass(device_get_parent(parent));
	if (parent_bus != pci)
		return (ENXIO);
	device_set_desc(dev, "PCI-BHND bridge");
	return (BUS_PROBE_DEFAULT);
}
static int bhndb_pci_probe ( device_t dev ) { device_t parent ; devclass_t parent_bus ; devclass_t pci ; pci = devclass_find ( " " ) ; parent = device_get_parent ( dev ) ; parent_bus = device_get_devclass ( device_get_parent ( parent ) ) ; if ( parent_bus != pci ) return ( ENXIO ) ; device_set_desc ( dev , " " ) ; return ( BUS_PROBE_DEFAULT ) ; }
Default bhndb_pci implementation of device_probe().
Default bhndb_pci implementation of device_probe () .
/* Our parent must be a PCI/PCIe device. */