FreeBSD/sys/isa/isa_common.c
/*
 * Add a new child with default ivars.
 */
Add a new child with default ivars.
Add a new child with default ivars .
static device_t
isa_add_child(device_t dev, u_int order, const char *name, int unit)
{
	device_t child;
	struct	isa_device *idev;
	child = device_add_child_ordered(dev, order, name, unit);
	if (child == NULL) 
		return (child);
	idev = malloc(sizeof(struct isa_device), M_ISADEV, M_NOWAIT | M_ZERO);
	if (!idev)
		return (0);
	resource_list_init(&idev->id_resources);
	TAILQ_INIT(&idev->id_configs);
	idev->id_order = order;
	device_set_ivars(child, idev);
	return (child);
}
static device_t isa_add_child ( device_t dev , u_int order , const char * name , int unit ) { device_t child ; struct isa_device * idev ; child = device_add_child_ordered ( dev , order , name , unit ) ; if ( child == NULL ) return ( child ) ; idev = malloc ( sizeof ( struct isa_device ) , M_ISADEV , M_NOWAIT | M_ZERO ) ; if ( ! idev ) return ( 0 ) ; resource_list_init ( & idev -> id_resources ) ; TAILQ_INIT ( & idev -> id_configs ) ; idev -> id_order = order ; device_set_ivars ( child , idev ) ; return ( child ) ; }
Add a new child with default ivars.
Add a new child with default ivars .