FreeBSD/sys/dev/bhnd/bhndb/bhndb.c
/**
 * Return the address space for the given @p child device.
 */
Return the address space for the given @p child device.
Return the address space for the given @p child device .
bhndb_addrspace
bhndb_get_addrspace(struct bhndb_softc *sc, device_t child)
{
	struct bhndb_devinfo	*dinfo;
	device_t		 imd_dev;
	imd_dev = child;
	while (imd_dev != NULL && device_get_parent(imd_dev) != sc->dev)
		imd_dev = device_get_parent(imd_dev);
	if (imd_dev == NULL)
		panic("bhndb address space request for non-child device %s\n",
		     device_get_nameunit(child));
	dinfo = device_get_ivars(imd_dev);
	return (dinfo->addrspace);
}
bhndb_addrspace bhndb_get_addrspace ( struct bhndb_softc * sc , device_t child ) { struct bhndb_devinfo * dinfo ; device_t imd_dev ; imd_dev = child ; while ( imd_dev != NULL && device_get_parent ( imd_dev ) != sc -> dev ) imd_dev = device_get_parent ( imd_dev ) ; if ( imd_dev == NULL ) panic ( " \n " , device_get_nameunit ( child ) ) ; dinfo = device_get_ivars ( imd_dev ) ; return ( dinfo -> addrspace ) ; }
Return the address space for the given @p child device.
Return the address space for the given @p child device .
/* Find the directly attached parent of the requesting device */