software/drivers/sd8887/src/bluetooth/bt/bt_main.c
/**
 *  @brief This function frees the structure of adapter
 *
 *  @param priv    A pointer to bt_private structure
 *  @return    N/A
 */
@brief This function frees the structure of adapter
@param priv    A pointer to bt_private structure
@return    N/A
@brief This function frees the structure of adapter @param priv A pointer to bt_private structure @return N / A
void
bt_free_adapter(bt_private *priv)
{
	bt_adapter *adapter = priv->adapter;
	ENTER();
	skb_queue_purge(&priv->adapter->tx_queue);
	kfree(adapter->tx_buffer);
	kfree(adapter->hw_regs_buf);
	if (adapter->fwdump_fname) {
		kfree(adapter->fwdump_fname);
		adapter->fwdump_fname = NULL;
	}
	kfree(adapter);
	priv->adapter = NULL;
	LEAVE();
}
void bt_free_adapter ( bt_private * priv ) { bt_adapter * adapter = priv -> adapter ; ENTER ( ) ; skb_queue_purge ( & priv -> adapter -> tx_queue ) ; kfree ( adapter -> tx_buffer ) ; kfree ( adapter -> hw_regs_buf ) ; if ( adapter -> fwdump_fname ) { kfree ( adapter -> fwdump_fname ) ; adapter -> fwdump_fname = NULL ; } kfree ( adapter ) ; priv -> adapter = NULL ; LEAVE ( ) ; }
@brief This function frees the structure of adapter
  @param priv    A pointer to bt_private structure
  @return    N/A
@brief This function frees the structure of adapter @param priv A pointer to bt_private structure @return N / A
/* Free allocated memory for fwdump filename */ /* Free the adapter object itself */