FreeBSD/sys/dev/bhnd/bcma/bcma_subr.c
/**
 * Initialize a device info structure previously allocated via
 * bcma_alloc_dinfo, assuming ownership of the provided core
 * configuration.
 * 
 * @param bus The requesting bus device.
 * @param dinfo The device info instance.
 * @param corecfg Device core configuration; ownership of this value
 * will be assumed by @p dinfo.
 * 
 * @retval 0 success
 * @retval non-zero initialization failed.
 */
Initialize a device info structure previously allocated via
bcma_alloc_dinfo, assuming ownership of the provided core
configuration.

@param bus The requesting bus device.
@param dinfo The device info instance.
@param corecfg Device core configuration; ownership of this value
will be assumed by @p dinfo.

@retval 0 success
@retval non-zero initialization failed.
Initialize a device info structure previously allocated via bcma_alloc_dinfo assuming ownership of the provided core configuration . @param bus The requesting bus device . @param dinfo The device info instance . @param corecfg Device core configuration ; ownership of this value will be assumed by @p dinfo . @retval 0 success @retval non - zero initialization failed .
int
bcma_init_dinfo(device_t bus, struct bcma_devinfo *dinfo,
    struct bcma_corecfg *corecfg)
{
	KASSERT(dinfo->corecfg == NULL, ("dinfo previously initialized"));
	dinfo->corecfg = corecfg;
	bcma_dinfo_init_resource_info(bus, dinfo, &corecfg->dev_ports);
	bcma_dinfo_init_resource_info(bus, dinfo, &corecfg->bridge_ports);
	bcma_dinfo_init_resource_info(bus, dinfo, &corecfg->wrapper_ports);
	return (0);
}
int bcma_init_dinfo ( device_t bus , struct bcma_devinfo * dinfo , struct bcma_corecfg * corecfg ) { KASSERT ( dinfo -> corecfg == NULL , ( " " ) ) ; dinfo -> corecfg = corecfg ; bcma_dinfo_init_resource_info ( bus , dinfo , & corecfg -> dev_ports ) ; bcma_dinfo_init_resource_info ( bus , dinfo , & corecfg -> bridge_ports ) ; bcma_dinfo_init_resource_info ( bus , dinfo , & corecfg -> wrapper_ports ) ; return ( 0 ) ; }
Initialize a device info structure previously allocated via
 bcma_alloc_dinfo, assuming ownership of the provided core
 configuration.
Initialize a device info structure previously allocated via bcma_alloc_dinfo assuming ownership of the provided core configuration .
/* Save core configuration value */ /* The device ports must always be initialized first to ensure that
	 * rid 0 maps to the first device port */