software/drivers/sd8887/src/bluetooth/bt/bt_main.c
/**
 *  @brief This function initializes module.
 *
 *  @return    BT_STATUS_SUCCESS or BT_STATUS_FAILURE
 */
@brief This function initializes module.
@brief This function initializes module .
static int
bt_init_module(void)
{
	int ret = BT_STATUS_SUCCESS;
	int index;
	ENTER();
	PRINTM(MSG, "BT: Loading driver\n");
	for (index = 0; index < MAX_BT_ADAPTER; index++)
		m_priv[index] = NULL;
	bt_root_proc_init();
	chardev_class = class_create(THIS_MODULE, MODULE_NAME);
	if (IS_ERR(chardev_class)) {
		PRINTM(ERROR, "Unable to allocate class\n");
		bt_root_proc_remove();
		ret = PTR_ERR(chardev_class);
		goto done;
	}
	if (sbi_register() == NULL) {
		bt_root_proc_remove();
		ret = BT_STATUS_FAILURE;
		goto done;
	}
done:
	if (ret)
		PRINTM(MSG, "BT: Driver loading failed\n");
	else
		PRINTM(MSG, "BT: Driver loaded successfully\n");
	LEAVE();
	return ret;
}
static int bt_init_module ( void ) { int ret = BT_STATUS_SUCCESS ; int index ; ENTER ( ) ; PRINTM ( MSG , " \n " ) ; for ( index = 0 ; index < MAX_BT_ADAPTER ; index ++ ) m_priv [ index ] = NULL ; bt_root_proc_init ( ) ; chardev_class = class_create ( THIS_MODULE , MODULE_NAME ) ; if ( IS_ERR ( chardev_class ) ) { PRINTM ( ERROR , " \n " ) ; bt_root_proc_remove ( ) ; ret = PTR_ERR ( chardev_class ) ; goto done ; } if ( sbi_register ( ) == NULL ) { bt_root_proc_remove ( ) ; ret = BT_STATUS_FAILURE ; goto done ; } done : if ( ret ) PRINTM ( MSG , " \n " ) ; else PRINTM ( MSG , " \n " ) ; LEAVE ( ) ; return ret ; }
@brief This function initializes module.
@brief This function initializes module .
/* Init the bt_private pointer array first */ /** create char device class */