FreeBSD/sys/dev/bhnd/bcma/bcma_subr.c
/**
 * Allocate and return a new empty device info structure.
 * 
 * @param bus The requesting bus device.
 * 
 * @retval NULL if allocation failed.
 */
Allocate and return a new empty device info structure.

@param bus The requesting bus device.

@retval NULL if allocation failed.
Allocate and return a new empty device info structure . @param bus The requesting bus device . @retval NULL if allocation failed .
struct bcma_devinfo *
bcma_alloc_dinfo(device_t bus)
{
	struct bcma_devinfo *dinfo;
	dinfo = malloc(sizeof(struct bcma_devinfo), M_BHND, M_NOWAIT|M_ZERO);
	if (dinfo == NULL)
		return (NULL);
	dinfo->corecfg = NULL;
	dinfo->res_agent = NULL;
	dinfo->rid_agent = -1;
	resource_list_init(&dinfo->resources);
	return (dinfo);
}
struct bcma_devinfo * bcma_alloc_dinfo ( device_t bus ) { struct bcma_devinfo * dinfo ; dinfo = malloc ( sizeof ( struct bcma_devinfo ) , M_BHND , M_NOWAIT | M_ZERO ) ; if ( dinfo == NULL ) return ( NULL ) ; dinfo -> corecfg = NULL ; dinfo -> res_agent = NULL ; dinfo -> rid_agent = -1 ; resource_list_init ( & dinfo -> resources ) ; return ( dinfo ) ; }
Allocate and return a new empty device info structure.
Allocate and return a new empty device info structure .