FreeBSD/sys/dev/bhnd/bhndb/bhndb_subr.c
/**
 * Search for a core resource priority descriptor in @p table that matches
 * @p device.
 * 
 * @param table The table to search.
 * @param device A bhnd(4) bus device.
 */
Search for a core resource priority descriptor in @p table that matches
@p device.

@param table The table to search.
@param device A bhnd(4) bus device.
Search for a core resource priority descriptor in @p table that matches @p device . @param table The table to search . @param device A bhnd ( 4 ) bus device .
const struct bhndb_hw_priority *
bhndb_hw_priority_find_device(const struct bhndb_hw_priority *table,
    device_t device)
{
	const struct bhndb_hw_priority	*hp;
	struct bhnd_core_info		 ci;
	ci = bhnd_get_core_info(device);
	for (hp = table; hp->ports != NULL; hp++) {
		if (bhnd_core_matches(&ci, &hp->match))
			return (hp);
	}
	return (NULL);
}
const struct bhndb_hw_priority * bhndb_hw_priority_find_device ( const struct bhndb_hw_priority * table , device_t device ) { const struct bhndb_hw_priority * hp ; struct bhnd_core_info ci ; ci = bhnd_get_core_info ( device ) ; for ( hp = table ; hp -> ports != NULL ; hp ++ ) { if ( bhnd_core_matches ( & ci , & hp -> match ) ) return ( hp ) ; } return ( NULL ) ; }
Search for a core resource priority descriptor in @p table that matches
 @p device.
Search for a core resource priority descriptor in @p table that matches @p device .
/* not found */