Exemplo n.º 1
0
/*
 * debug, log, and console message handling
 */
usb_log_handle_t
usb_alloc_log_hdl(dev_info_t *dip, char *name,
	uint_t *errlevel, uint_t *mask, uint_t *instance_filter,
	usb_flags_t flags)
{
	usba_log_handle_impl_t	*hdl;

	USBA_CHECK_CONTEXT();
	hdl = kmem_zalloc(sizeof (*hdl), KM_SLEEP);

	hdl->lh_dip = dip;
	if (dip && (name == NULL)) {
		hdl->lh_name = (char *)ddi_driver_name(dip);
	} else {
		hdl->lh_name = name;
	}
	hdl->lh_errlevel = errlevel;
	hdl->lh_mask = mask;
	hdl->lh_instance_filter = instance_filter;
	hdl->lh_flags = flags;

#ifdef __lock_lint
	(void) usb_alloc_log_handle(dip, name, errlevel, mask,
	    instance_filter, 0, flags);
	usb_free_log_handle(NULL);
#endif

	return ((usb_log_handle_t)hdl);
}
Exemplo n.º 2
0
void
usba10_usb_free_log_handle(usb_log_handle_t handle)
{
	usb_free_log_handle(handle);
}